private static DomDataCollection AddDomDataCollection(DomDocument domDocument) { Contract.Requires(domDocument != null); // Add data collection node. var domDataCollection = domDocument.CreateAndAddNode(() => DomDataCollection.Create()); return(domDataCollection); }
internal DomDataCollection SetDomDataCollectionEmpty() { // Validation this.ValidateDataDoesNotExist(); // Add the one allowed DOM data node to the DOM document node. var domDataCollection = this.CreateAndAddNode(() => DomDataCollection.Create()); return(domDataCollection); }
internal DomDataCollection AddDataCollection() { // Validation this.ValidateDataCollectionDoesNotExist(); this.ValidateDataAndErrorsWillNotCoexist(); // Add the one allowed DOM data collection node to the DOM document node. var domDataCollection = this.CreateAndAddNode(() => DomDataCollection.Create()); return(domDataCollection); }
internal DomDataCollection SetDomDataCollection(IEnumerable <ResourceIdentifier> apiResourceIdentifierCollection, Type clrResourceType) { Contract.Requires(apiResourceIdentifierCollection != null); Contract.Requires(clrResourceType != null); // Validation this.ValidateDataDoesNotExist(); // Add the one allowed DOM data collection node to the DOM document node. var domDataCollection = this.CreateAndAddNode(() => DomDataCollection.Create()); // Add the many allowed DOM resource identifier nodes to the DOM document node. var domReadOnlyResourceIdentifierCollection = apiResourceIdentifierCollection.Select(x => domDataCollection.CreateAndAddNode(() => DomReadOnlyResourceIdentifier.Create(x, clrResourceType))) .ToList(); return(domDataCollection); }
public static DomDataCollection CreateFromResourceIdentifiers(IEnumerable <DomReadWriteResourceIdentifier> domReadWriteResourceIdentifiers) { var domDataCollection = new DomDataCollection(domReadWriteResourceIdentifiers); return(domDataCollection); }
public static DomDataCollection CreateFromResourceIdentifiers(params DomReadWriteResourceIdentifier[] domReadWriteResourceIdentifiers) { var domDataCollection = new DomDataCollection(domReadWriteResourceIdentifiers); return(domDataCollection); }
public static DomDataCollection CreateFromResources(IEnumerable <DomReadOnlyResource> domReadOnlyResources) { var domDataCollection = new DomDataCollection(domReadOnlyResources); return(domDataCollection); }
public static DomDataCollection CreateFromResources(params DomReadOnlyResource[] domReadOnlyResources) { var domDataCollection = new DomDataCollection(domReadOnlyResources); return(domDataCollection); }
// PUBLIC METHODS /////////////////////////////////////////////////// #region Factory Methods public static DomDataCollection Create(params Node <DomNodeType>[] domResourcesOrResourceIdentifiers) { var domDataCollection = new DomDataCollection(domResourcesOrResourceIdentifiers); return(domDataCollection); }