Exemplo n.º 1
0
        public static ServiceError DNSServiceResolve(out ServiceRef sdRef,
                                                     ServiceFlags flags,
                                                     uint interfaceIndex,
                                                     byte[] name,
                                                     string regtype,
                                                     string domain,
                                                     DNSServiceResolveReply callBack,
                                                     IntPtr context)
        {
            switch (Native.GetCurrentOperatingSystem())
            {
            case OperatingSystem.Windows:
                return(NativeWindows.DNSServiceResolve(out sdRef, flags, interfaceIndex, name, regtype, domain, callBack, context));

            case OperatingSystem.OSX:
                return(NativeOSX.DNSServiceResolve(out sdRef, flags, interfaceIndex, name, regtype, domain, callBack, context));

            default:
                throw new InvalidOperationException("The current OS is unsupported");
            }
        }