Пример #1
0
		internal Schema.AssociationType AddAssociationType(string name, string typeNamespace)
		{
			string str = string.Concat(typeNamespace, ".", name);
			Schema.AssociationType associationType = new Schema.AssociationType(str);
			this.AssociationTypes.Add(str, associationType);
			return associationType;
		}
Пример #2
0
        internal Schema.AssociationType AddAssociationType(string name, string typeNamespace)
        {
            string str = string.Concat(typeNamespace, ".", name);

            Schema.AssociationType associationType = new Schema.AssociationType(str);
            this.AssociationTypes.Add(str, associationType);
            return(associationType);
        }
Пример #3
0
        internal void AddResourceSetReferenceProperty(ResourceType sourceType, string name, ResourceType targetType, Schema.AssociationType assocType)
        {
            ResourceProperty resourcePropertyWithDescription = new ResourcePropertyWithDescription(name, ResourcePropertyKind.ResourceSetReference, targetType);

            resourcePropertyWithDescription.CanReflectOnInstanceTypeProperty = false;
            resourcePropertyWithDescription.CustomState = new ReferenceCustomState(true);
            resourcePropertyWithDescription.GetReferenceCustomState().AssociationType = assocType;
            sourceType.AddProperty(resourcePropertyWithDescription);
        }