예제 #1
0
        public DocumentNode CreateCollectionItemForProperty(DocumentCompositeNode documentNode, string collectionPropertyName, string value)
        {
            SampleCompositeType sampleCompositeType = documentNode.Type as SampleCompositeType;

            if (sampleCompositeType == null)
            {
                return((DocumentNode)null);
            }
            SampleProperty sampleProperty = sampleCompositeType.GetSampleProperty(collectionPropertyName);

            if (sampleProperty == null)
            {
                return((DocumentNode)null);
            }
            return(this.CreateCollectionItemForPropertyInternal(documentNode, sampleProperty, value));
        }
예제 #2
0
        public DocumentNode CreatePropertyValue(DocumentCompositeNode documentNode, string propertyName, string value)
        {
            SampleCompositeType sampleCompositeType = documentNode.Type as SampleCompositeType;

            if (sampleCompositeType == null)
            {
                return((DocumentNode)null);
            }
            SampleProperty sampleProperty = sampleCompositeType.GetSampleProperty(propertyName);

            if (sampleProperty == null)
            {
                return((DocumentNode)null);
            }
            return(this.CreatePropertyValueInternal(documentNode, sampleProperty, value));
        }