예제 #1
0
        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);
        }
예제 #2
0
파일: Schema.cs 프로젝트: nickchal/pash
		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;
		}