Skip to content

Commit

Permalink
update types
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskapp committed Sep 17, 2024
1 parent 608b8c9 commit 73ea919
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/Generator/Type/CSharp.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ public function getContentType(ContentType $contentType, int $context): string
{
return match ($contentType) {
ContentType::BINARY => 'byte[]',
ContentType::FORM => 'Dictionary<string, string>',
ContentType::FORM => 'System.Collections.Specialized.NameValueCollection',
ContentType::JSON => 'object',
ContentType::MULTIPART => '',
ContentType::MULTIPART => 'System.Collections.Generic.Dictionary<string, string>',
ContentType::TEXT => $this->getString(),
ContentType::XML => 'XmlDocument',
ContentType::XML => 'System.Xml.XmlDocument',
};
}

Expand All @@ -52,9 +52,9 @@ protected function getString(): string
protected function getStringFormat(Format $format): string
{
return match ($format) {
Format::DATE => 'DateOnly',
Format::DATETIME => 'DateTime',
Format::TIME => 'TimeOnly',
Format::DATE => 'System.DateOnly',
Format::DATETIME => 'System.DateTime',
Format::TIME => 'System.TimeOnly',
default => $this->getString(),
};
}
Expand Down Expand Up @@ -85,12 +85,12 @@ protected function getBoolean(): string

protected function getArray(string $type): string
{
return 'List<' . $type . '>';
return 'System.Collections.Generic.List<' . $type . '>';
}

protected function getMap(string $type): string
{
return 'Dictionary<string, ' . $type . '>';
return 'System.Collections.Generic.Dictionary<string, ' . $type . '>';
}

protected function getUnion(array $types): string
Expand Down

0 comments on commit 73ea919

Please sign in to comment.