Reputation: 51
For example "Guid" types are ganerated as "any" type.
Uri type is generated as complex type:
{
AbsolutePath: string;
AbsoluteUri: string;
Authority: string;
DnsSafeHost: string;
Fragment: string;
Host: string;
HostNameType: any;
IsAbsoluteUri: boolean;
IsDefaultPort: boolean;
IsFile: boolean;
IsLoopback: boolean;
IsUnc: boolean;
LocalPath: string;
OriginalString: string;
PathAndQuery: string;
Port: number;
Query: string;
Scheme: string;
Segments: string[];
UserEscaped: boolean;
UserInfo: string;
}
but in reality it is serialized as string.
So... Is it possible somehow to tell WebEssentials, how to serialize property types, either globally:
Guid -> string
Uri -> string
or locally property by property:
[TypescriptType(typeof(string))]
Guid Id {get; set;};
Of course, globally by project or solution is better.
Upvotes: 4
Views: 943
Reputation: 1147
It seems that Web Essentials can't do this (yet?). I'd suggest you two things:
GetClassName
.
Upvotes: 2