示例#1
0
        void Unregister(BaseUriWithWildcard path)
        {
            Fx.Assert(paths.Contains(path), "Unregister: unregistering an unregistered path");

            if (DiagnosticUtility.ShouldTraceInformation)
            {
                ListenerTraceUtility.TraceEvent(TraceEventType.Information, ListenerTraceCode.MessageQueueUnregisterSucceeded, SR.GetString(SR.TraceCodeMessageQueueUnregisterSucceeded), new StringTraceRecord("Path", path.ToString()), this, null);
            }

            if (TD.MessageQueueUnregisterSucceededIsEnabled())
            {
                TD.MessageQueueUnregisterSucceeded(this.EventTraceActivity, path.ToString());
            }

            RoutingTable.Stop(this, path);
            IncrementUrisUnregisteredCounters();
            OnUnregisterCompleted();

            registry.Remove(path);
            paths.Remove(path);
        }