Pomona.ClientMetadata.With C# (CSharp) Method

With() public method

Initializes a new instance of the ClientMetadata class, based on the current instance. Parameters with a given value will override the current value; the others will have their value from the current instance.
public With ( string assemblyName = null, string name = null, string interfaceName = null, string @namespace = null, string informationalVersion = null ) : ClientMetadata
assemblyName string The name of the generated assembly. Default set to "Client".
name string The name of the REST client class.
interfaceName string The name of the REST client interface. This should usually be /// identical to , with an 'I' prefix. Default set to "IClient".
@namespace string
informationalVersion string The informational version of the generated assembly. Defaults to 1.0.0.0.
return ClientMetadata
        public ClientMetadata With(string assemblyName = null,
                                   string name = null,
                                   string interfaceName = null,
                                   string @namespace = null,
                                   string informationalVersion = null)
        {
            if (String.IsNullOrWhiteSpace(assemblyName))
                assemblyName = AssemblyName;

            if (String.IsNullOrWhiteSpace(name))
                name = Name;

            if (String.IsNullOrWhiteSpace(interfaceName))
                interfaceName = String.Concat('I', name);

            if (String.IsNullOrWhiteSpace(@namespace))
                @namespace = Namespace;

            if (String.IsNullOrWhiteSpace(informationalVersion))
                informationalVersion = InformationalVersion;

            return new ClientMetadata(assemblyName, name, interfaceName, @namespace, informationalVersion);
        }