Example #1
0
        protected object[] ExtensionGet(string attribute)
        {
            ExtensionCacheValue extensionCacheValue = null;

            if (attribute != null)
            {
                if (!this.extensionCache.TryGetValue(attribute, out extensionCacheValue))
                {
                    if (!this.unpersisted)
                    {
                        DirectoryEntry underlyingObject = (DirectoryEntry)this.GetUnderlyingObject();
                        int            count            = underlyingObject.Properties[attribute].Count;
                        if (count != 0)
                        {
                            object[] objArray = new object[count];
                            underlyingObject.Properties[attribute].CopyTo(objArray, 0);
                            return(objArray);
                        }
                        else
                        {
                            return(new object[0]);
                        }
                    }
                    else
                    {
                        return(new object[0]);
                    }
                }
                else
                {
                    if (!extensionCacheValue.Filter)
                    {
                        return(extensionCacheValue.Value);
                    }
                    else
                    {
                        return(null);
                    }
                }
            }
            else
            {
                throw new ArgumentException(StringResources.NullArguments);
            }
        }
Example #2
0
 internal bool TryGetValue(string attr, out ExtensionCacheValue o)
 {
     return(_cache.TryGetValue(attr, out o));
 }
Example #3
0
		internal bool TryGetValue(string attr, out ExtensionCacheValue o)
		{
			return this.cache.TryGetValue(attr, out o);
		}