コード例 #1
0
        internal void ResolveAll(bool throwOnError)
        {
            try {
                Resolve();
            }
            catch {
                if (throwOnError)
                {
                    throw;
                }

                // can't continue, because we couldn't find a document.
                return;
            }

            foreach (object o in Document.References)
            {
                DiscoveryDocumentReference r = o as DiscoveryDocumentReference;
                if (r == null)
                {
                    continue;
                }
                if (ClientProtocol.Documents[r.Url] != null)
                {
                    continue;
                }
                r.ClientProtocol = ClientProtocol;
                r.ResolveAll(throwOnError);
            }
        }
 internal void ResolveAll(bool throwOnError)
 {
     try
     {
         base.Resolve();
     }
     catch (Exception exception)
     {
         if (((exception is ThreadAbortException) || (exception is StackOverflowException)) || (exception is OutOfMemoryException))
         {
             throw;
         }
         if (throwOnError)
         {
             throw;
         }
         if (Tracing.On)
         {
             Tracing.ExceptionCatch(TraceEventType.Warning, this, "ResolveAll", exception);
         }
         return;
     }
     foreach (object obj2 in this.Document.References)
     {
         DiscoveryDocumentReference reference = obj2 as DiscoveryDocumentReference;
         if ((reference != null) && (base.ClientProtocol.Documents[reference.Url] == null))
         {
             reference.ClientProtocol = base.ClientProtocol;
             reference.ResolveAll(throwOnError);
         }
     }
 }
コード例 #3
0
        internal void ResolveAll(bool throwOnError)
        {
            try {
                Resolve();
            }
            catch (Exception e) {
                if (e is ThreadAbortException || e is StackOverflowException || e is OutOfMemoryException)
                {
                    throw;
                }
                if (throwOnError)
                {
                    throw;
                }

                if (Tracing.On)
                {
                    Tracing.ExceptionCatch(TraceEventType.Warning, this, "ResolveAll", e);
                }

                // can't continue, because we couldn't find a document.
                return;
            }

            foreach (object o in Document.References)
            {
                DiscoveryDocumentReference r = o as DiscoveryDocumentReference;
                if (r == null)
                {
                    continue;
                }
                if (ClientProtocol.Documents[r.Url] != null)
                {
                    continue;
                }
                r.ClientProtocol = ClientProtocol;
                r.ResolveAll(throwOnError);
            }
        }