Example #1
0
        public bool Equals(ObjectId objectId)
        {
            // If parameter is null return false:
            if (objectId == null)
                return false;

            return this.Value.Equals(objectId.Value);
        }
Example #2
0
        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();
        }
Example #3
0
        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;
        }
Example #4
0
        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();
        }
Example #5
0
 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;
 }
Example #7
0
 public AccessGroupRef(ObjectId objectId, string namespaceValue, string typeValue)
     : this()
 {
     SetBaseData(objectId, namespaceValue, typeValue);
 }
Example #8
0
 internal CArchetypeRoot FetchOperationalObject(ArchetypeConstraint constraint, ObjectId id)
 {
     return FetchObject != null ? FetchObject(constraint, new FetchOperationalObjectEventArgs(id)) : null;
 }