Beispiel #1
0
        private void CollectOutlets(IIBReferenceResolver resolver)
        {
            IBDictionary dict = this.Find <IBDictionary>("outlets");

            if (dict == null)
            {
                return;
            }

            foreach (String key in dict.Keys)
            {
                IBString itemKey = dict[key] as IBString;
                if (itemKey == null)
                {
                    continue;
                }

                IIBItem     itemValue = dict[key];
                IBReference reference = itemValue as IBReference;
                if ((resolver != null) && (reference != null))
                {
                    itemValue = resolver.ResolveReference(reference);
                }
                this.outlets.Add(new IBOutletDescriptor(key, itemValue.ToString()));
            }
        }
Beispiel #2
0
 /// <summary>
 ///   Resolves the reference.
 /// </summary>
 /// <param name = "reference">The reference.</param>
 /// <returns></returns>
 public IIBItem ResolveReference(IBReference reference)
 {
     if (this.references.ContainsKey(reference.Value))
     {
         return(this.references[reference.Value]);
     }
     return(null);
 }
Beispiel #3
0
        /// <summary>
        ///   Dereferences the given item.
        /// </summary>
        /// <param name = "resolver">The resolver.</param>
        /// <param name = "item">The item.</param>
        /// <returns></returns>
        public IIBItem DereferenceItem(IIBReferenceResolver resolver, IIBItem item)
        {
            IBReference reference = item as IBReference;

            return((reference == null) ? item : resolver.ResolveReference(reference));
        }