protected internal ClientMetadata(string assemblyName = "Client",
string name = "Client",
string interfaceName = "IClient",
string @namespace = "Client",
string informationalVersion = "1.0.0.0")
{
if (String.IsNullOrWhiteSpace(assemblyName))
assemblyName = "Client";
if (String.IsNullOrWhiteSpace(name))
name = assemblyName.Split('.').Last();
if (String.IsNullOrWhiteSpace(interfaceName))
interfaceName = String.Concat('I', name);
if (String.IsNullOrWhiteSpace(@namespace))
@namespace = assemblyName;
if (String.IsNullOrWhiteSpace(informationalVersion))
informationalVersion = "1.0.0.0";
if (!IsRunningOnMono())
{
// NOTE: Validation of identifiers not working on Mono, due to System.CodeDom not being fully compatible.
ValidateIdentifiers(new Dictionary<string, CodeObject>
{
{ "name", new CodeTypeDeclaration(name) },
{ "interfaceName", new CodeTypeDeclaration(interfaceName) },
{ "namespace", new CodeNamespace(@namespace) },
});
}
AssemblyName = assemblyName;
Name = name;
InterfaceName = interfaceName;
Namespace = @namespace;
InformationalVersion = informationalVersion;
}