Beispiel #1
0
        public void AddReferenceDefinition(ReferenceDefinition referenceDefinition)
        {
            if (referenceDefinition == null)
            {
                throw new ArgumentNullException("referenceDefinition");
            }

            LazyReferenceDefinitionList.Value.Add(referenceDefinition);
        }
Beispiel #2
0
        public void CloneReferenceDefinition(ReferenceDefinition referenceDefinition)
        {
            if (referenceDefinition == null)
            {
                throw new ArgumentNullException("referenceDefinition");
            }

            var referenceFrom = GetOrAddReferenceFrom(referenceDefinition.ReferenceFrom.Symbol);
            var referenceTo   = GetOrAddReferenceTo(referenceDefinition.ReferenceTo.Symbol);

            AddReferenceDefinition(referenceDefinition.Clone(referenceFrom, referenceTo));
        }
        public void AddReference(ReferenceDefinition referenceDefinition)
        {
            if (referenceDefinition == null)
            {
                throw new ArgumentNullException("referenceDefinition");
            }

            if (References.Contains(referenceDefinition))
            {
                throw new ArgumentException("Reference definition is already added");
            }

            ReferenceList.Add(referenceDefinition);
        }