예제 #1
0
        private void InvokeOnProperty(PSObject value, bool raw, PropertyAction action)
        {
            DirectoryEntryPropertyDictionary entryProperties = GetProperties(raw);

            foreach (PSPropertyInfo psprop in value.Properties)
            {
                if (entryProperties.ContainsKey(psprop.Name))
                {
                    action(entryProperties[psprop.Name], psprop.Value);
                }
            }
        }
예제 #2
0
        private DirectoryEntryPropertyDictionary GetProperties(bool raw)
        {
            DirectoryEntryPropertyDictionary properties = new DirectoryEntryPropertyDictionary();

            if (raw)
            {
                properties.AddRange(DirectoryEntryType.GetRawProperties(Entry));
            }
            else
            {
                foreach (DirectoryEntryType type in Types)
                {
                    properties.AddRange(type.GetProperties(Entry));
                }
            }

            return(properties);
        }
예제 #3
0
        private DirectoryEntryPropertyDictionary GetProperties(bool raw)
        {
            DirectoryEntryPropertyDictionary properties = new DirectoryEntryPropertyDictionary();

            if (raw)
            {
                properties.AddRange(DirectoryEntryType.GetRawProperties(Entry));
            }
            else
            {
                foreach (DirectoryEntryType type in Types)
                {
                    properties.AddRange(type.GetProperties(Entry));
                }
            }

            return properties;
        }