private async void ServiceBrowserForm_Load(object sender, EventArgs e) { try { if (!await _service.ProbeServiceAsync()) { WriteLine("The mDNSResponder Service is not running"); return; } WriteLine(@"Starting service type enumeration meta-query"); _browseServicesToken = await _service.BrowseAsync(@"_services._dns-sd._udp", string.Empty, InterfaceIndex.Any); _browseServicesToken.StateChanged += OperationStatechanged; void OperationStatechanged(object s, OperationState state) { if (state == OperationState.Canceled || state == OperationState.Faulted) { WriteLine($"Service type enumeration operation state changed to: {state}"); _browseServicesToken.StateChanged -= OperationStatechanged; } }; } catch (DnsServiceException dse) { treeViewServices.ResumeDrawing(); WriteLine($"Service type enumeration browse operation failed: {dse.Message}"); } }
private static void HandleOperationToken <T>(Stack <IOperationToken> operationsStack, IOperationToken operationToken, Stack <IExpressionTreeNode <T> > resultStack) { while (operationsStack.Count > 0 && operationsStack.Peek().Priority >= operationToken.Priority) { AppendOperationToResult(operationsStack, resultStack); } operationsStack.Push(operationToken); }
public SSOGeneralCrossDomainbase(Page page) { Operation = new OperationPage(page); tokenService = new OperationCache(Operation); }
public SSOGeneralCrossDomainbase(HttpContextBase context) { Operation = new OperationHttpContext(context); tokenService = new OperationCache(Operation); }