diff --git a/src/Generator/Type/CSharp.php b/src/Generator/Type/CSharp.php index afee9013..380f2098 100644 --- a/src/Generator/Type/CSharp.php +++ b/src/Generator/Type/CSharp.php @@ -36,11 +36,11 @@ public function getContentType(ContentType $contentType, int $context): string { return match ($contentType) { ContentType::BINARY => 'byte[]', - ContentType::FORM => 'Dictionary', + ContentType::FORM => 'System.Collections.Specialized.NameValueCollection', ContentType::JSON => 'object', - ContentType::MULTIPART => '', + ContentType::MULTIPART => 'System.Collections.Generic.Dictionary', ContentType::TEXT => $this->getString(), - ContentType::XML => 'XmlDocument', + ContentType::XML => 'System.Xml.XmlDocument', }; } @@ -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(), }; } @@ -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'; + return 'System.Collections.Generic.Dictionary'; } protected function getUnion(array $types): string