예제 #1
0
        public virtual ISecureObject GetSecureObjectByUniqueName(string uniqueName, bool includeChildren = true, bool includeDisabled = false)
        {
            SecureObject found = Store.SecureObjects.FindRecursive <SecureObject>(o => o.UniqueName.Equals(uniqueName, StringComparison.OrdinalIgnoreCase) && (o.IsEnabled || includeDisabled));

            if (found != null && !includeChildren)
            {
                found = found.Clone(shallow: false);
            }

            return(found);
        }
예제 #2
0
        public virtual ISecureObject GetSecureObjectByUId(Guid secureObjectUId, bool includeChildren = false, bool includeDisabled = false)
        {
            SecureObject found = Store.SecureObjects.FindRecursive <SecureObject>(o => o.UId == secureObjectUId && (o.IsEnabled || includeDisabled));

            if (found != null && !includeChildren)
            {
                found = found.Clone(shallow: false);
            }

            return(found);
        }