internal static void ToExtendedIPv6(string extendedAttribute, string[] directoryAttributes, ADEntity userObj, ADEntity directoryObj, CmdletSessionInfo cmdletSessionInfo) { if (!directoryObj.Contains(directoryAttributes[0])) { userObj.Add(extendedAttribute, new ADPropertyValueCollection()); return; } else { string value = directoryObj[directoryAttributes[0]].Value as string; userObj.Add(extendedAttribute, IPUtil.GetIPAddress(value, IPUtil.IPVersion.IPv6)); return; } }
internal static void ToExtendedFromTransportTypeToISTPEnum(string extendedAttribute, string[] directoryAttributes, ADEntity userObj, ADEntity directoryObj, CmdletSessionInfo cmdletSessionInfo) { if (!directoryObj.Contains(directoryAttributes[0]) || directoryObj[directoryAttributes[0]].Value == null) { userObj.Add(extendedAttribute, new ADPropertyValueCollection()); return; } else { string value = (string)directoryObj[directoryAttributes[0]].Value; string childName = ADPathModule.GetChildName(value, ADPathFormat.X500); ADInterSiteTransportProtocolType aDInterSiteTransportProtocolType = ADInterSiteTransportProtocolType.IP; if (string.Compare("CN=IP", childName, StringComparison.OrdinalIgnoreCase) != 0) { aDInterSiteTransportProtocolType = ADInterSiteTransportProtocolType.SMTP; } ADPropertyValueCollection aDPropertyValueCollection = new ADPropertyValueCollection((object)aDInterSiteTransportProtocolType); userObj.Add(extendedAttribute, aDPropertyValueCollection); return; } }