internal ResourceType AddResourceType(string name, ResourceTypeKind kind, string typeNamespace, ResourceType baseType, string clrType = null) { name.ThrowIfNullOrEmpty("name", Resources.NullIsPassedAsResourceName, new object[0]); if (typeNamespace == null) { typeNamespace = this.ContainerNamespace; } ResourceType resourceTypeWithDescription = new ResourceTypeWithDescription(typeof(DSResource), kind, baseType, typeNamespace, name, false); resourceTypeWithDescription.CanReflectOnInstanceType = false; resourceTypeWithDescription.CustomState = new ResourceCustomState(clrType); this.ResourceTypes.Add(resourceTypeWithDescription.FullName, resourceTypeWithDescription); return(resourceTypeWithDescription); }
internal ResourceType AddResourceType(string name, ResourceTypeKind kind, string typeNamespace, ResourceType baseType, string clrType = null) { name.ThrowIfNullOrEmpty("name", Resources.NullIsPassedAsResourceName, new object[0]); if (typeNamespace == null) { typeNamespace = this.ContainerNamespace; } ResourceType resourceTypeWithDescription = new ResourceTypeWithDescription(typeof(DSResource), kind, baseType, typeNamespace, name, false); resourceTypeWithDescription.CanReflectOnInstanceType = false; resourceTypeWithDescription.CustomState = new ResourceCustomState(clrType); this.ResourceTypes.Add(resourceTypeWithDescription.FullName, resourceTypeWithDescription); return resourceTypeWithDescription; }