public static CriticalAllocHandleSocketAddress FromIPAddress(IPAddress input) { if (input == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("input"); } CriticalAllocHandleSocketAddress address = null; address = FromSize(Marshal.SizeOf(typeof(System.ServiceModel.Channels.sockaddr_in6))); System.ServiceModel.Channels.sockaddr_in6 structure = new System.ServiceModel.Channels.sockaddr_in6(input); Marshal.StructureToPtr(structure, (IntPtr) address, false); return address; }
public static CriticalAllocHandleSocketAddress FromIPAddress(IPAddress input) { if (input == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("input"); } CriticalAllocHandleSocketAddress address = null; address = FromSize(Marshal.SizeOf(typeof(System.ServiceModel.Channels.sockaddr_in6))); System.ServiceModel.Channels.sockaddr_in6 structure = new System.ServiceModel.Channels.sockaddr_in6(input); Marshal.StructureToPtr(structure, (IntPtr)address, false); return(address); }