예제 #1
0
        private static DomData AddDomData(DomDocument domDocument)
        {
            Contract.Requires(domDocument != null);

            // Add data node.
            var domData = domDocument.CreateAndAddNode(() => DomData.Create());

            return(domData);
        }
        internal DomData SetDomDataNull()
        {
            // Validation
            this.ValidateDataDoesNotExist();

            // Add the one allowed DOM data node to the DOM document node.
            var domData = this.CreateAndAddNode(() => DomData.Create());

            return(domData);
        }
예제 #3
0
        internal DomData AddData()
        {
            // Validation
            this.ValidateDataDoesNotExist();
            this.ValidateDataAndErrorsWillNotCoexist();

            // Add the one allowed DOM data node to the DOM document node.
            var domData = this.CreateAndAddNode(() => DomData.Create());

            return(domData);
        }
        internal DomData SetDomData(ResourceIdentifier apiResourceIdentifier, Type clrResourceType)
        {
            Contract.Requires(apiResourceIdentifier != null);
            Contract.Requires(clrResourceType != null);

            // Validation
            this.ValidateDataDoesNotExist();

            // Add the one allowed DOM data node to the DOM document node.
            var domData = this.CreateAndAddNode(() => DomData.Create());

            // Add the one allowed DOM resource identifier node to the DOM document node.
            var domReadOnlyResourceIdentifier = domData.CreateAndAddNode(() => DomReadOnlyResourceIdentifier.Create(apiResourceIdentifier, clrResourceType));

            return(domData);
        }