示例#1
0
        public bool TryGetChainedResource(string propertyName, ChildObjectScopeBinding bindingType, out IApiChildResourceHandler childHandler)
        {
            var retVal = this.m_propertyProviders.TryGetValue(propertyName, out childHandler) &&
                         childHandler.ScopeBinding.HasFlag(bindingType);

            if (!retVal)
            {
                childHandler = null;//clear in case of lazy programmers like me
            }
            return(retVal);
        }
示例#2
0
 /// <summary>
 /// Add a child resource
 /// </summary>
 public void AddChildResource(IApiChildResourceHandler property)
 {
     this.m_propertyProviders.TryAdd(property.Name, property);
 }