public bool Equals(ObjectId objectId) { // If parameter is null return false: if (objectId == null) return false; return this.Value.Equals(objectId.Value); }
public ObjectRef(ObjectId objectId, string namespaceValue, string typeValue) : this() { Check.Require(!string.IsNullOrEmpty(namespaceValue), "namespaceValue must not be null or empty"); Check.Require(objectId != null, "objectId must not be null"); Check.Require(!string.IsNullOrEmpty(typeValue), "typeValue must not be null or empty"); this.id = objectId; this.namespaceValue = namespaceValue; this.type = typeValue; CheckInvariants(); }
protected void SetBaseData(ObjectId objectId, string @namespace, string type) { Check.Require(objectId != null, "objectId must not be null"); Check.Require(!string.IsNullOrEmpty(@namespace), "namespace must not be null or empty"); Check.Require(!string.IsNullOrEmpty(type), "type must not be null or empty"); this.id = objectId; this.namespaceValue = @namespace; this.type = type; }
protected virtual void ReadXmlBase(System.Xml.XmlReader reader) { Check.Assert(reader.LocalName == "id", "reader localName must be 'id'"); if (this.id == null) { string objectIdType = reader.GetAttribute("type", RmXmlSerializer.XsiNamespace); this.id = ObjectId.GetObjectIdByType(objectIdType); } this.id.ReadXml(reader); Check.Assert(reader.LocalName == "namespace", "reader localName must be 'namespace'"); this.namespaceValue = reader.ReadElementContentAsString(); if (!reader.IsStartElement()) reader.ReadEndElement(); reader.MoveToContent(); Check.Assert(reader.LocalName == "type", "reader localName must be 'type'"); this.type = reader.ReadElementContentAsString(); }
public PartyRef(ObjectId objectId, string namespaceValue, string typeValue) : this() { SetBaseData(objectId, namespaceValue, typeValue); }
public FetchOperationalObjectEventArgs(ObjectId id) { Check.Require(id != null, "id must not be null."); this.id = id; }
public AccessGroupRef(ObjectId objectId, string namespaceValue, string typeValue) : this() { SetBaseData(objectId, namespaceValue, typeValue); }
internal CArchetypeRoot FetchOperationalObject(ArchetypeConstraint constraint, ObjectId id) { return FetchObject != null ? FetchObject(constraint, new FetchOperationalObjectEventArgs(id)) : null; }