RemovePropertyType() abstract private method

abstract private RemovePropertyType ( PropertyType propertyType ) : void
propertyType PropertyType
return void
Beispiel #1
0
        public void RemovePropertyTypeFromPropertySet(PropertyType propertyType, PropertySet owner)
        {
            if (propertyType == null)
            {
                throw new ArgumentNullException("propertyType");
            }
            if (owner == null)
            {
                throw new ArgumentNullException("owner");
            }
            if (propertyType.SchemaRoot != this)
            {
                throw new InvalidSchemaException(SR.Exceptions.Schema.Msg_InconsistentHierarchy);
            }
            if (owner.SchemaRoot != this)
            {
                throw new InvalidSchemaException(SR.Exceptions.Schema.Msg_InconsistentHierarchy);
            }

            owner.RemovePropertyType(propertyType);
            if (!IsUsedPropertyType(propertyType))
            {
                DeletePropertyType(propertyType);
            }
        }
Beispiel #2
0
		public void RemovePropertyTypeFromPropertySet(PropertyType propertyType, PropertySet owner)
		{
			if (propertyType == null)
				throw new ArgumentNullException("propertyType");
			if (owner == null)
				throw new ArgumentNullException("owner");
			if (propertyType.SchemaRoot != this)
				throw new InvalidSchemaException(SR.Exceptions.Schema.Msg_InconsistentHierarchy);
			if (owner.SchemaRoot != this)
				throw new InvalidSchemaException(SR.Exceptions.Schema.Msg_InconsistentHierarchy);

			owner.RemovePropertyType(propertyType);
			if(!IsUsedPropertyType(propertyType))
				DeletePropertyType(propertyType);
		}