DirectoryAccessChange BuildDirectoryAccessChange(RmAttributeName name, IComparable value) { if (value == null) { throw new ArgumentNullException("name", string.Format("Attribute '{0}' is null.", name)); } DirectoryAccessChange retReqChange = new DirectoryAccessChange(); retReqChange.AttributeType = name.Name; XmlElement attributeValueElem = base.RmDoc.CreateElement(retReqChange.AttributeType, RmNamespace); attributeValueElem.InnerText = value.ToString(); retReqChange.AttributeValue.Values.Add(attributeValueElem); return retReqChange; }
DirectoryAccessChange BuildDirectoryAccessChange(RmAttributeChange attribute) { DirectoryAccessChange retReqChange = new DirectoryAccessChange(); retReqChange.AttributeType = attribute.Name.Name; XmlElement attributeValueElem = base.RmDoc.CreateElement(retReqChange.AttributeType, RmNamespace); if (attribute.Value != null) { attributeValueElem.InnerText = attribute.Value.ToString(); } retReqChange.AttributeValue.Values.Add(attributeValueElem); return retReqChange; }