Beispiel #1
0
        void grabInternalChain(X509Chain chain)
        {
            TreeNode <ChainElement> tree = srv.TempResponse == null
                ? new TreeNode <ChainElement>(new ChainElement {
                Name = srv.TempRequest.Address.AbsoluteUri, IsRoot = true
            })
                : new TreeNode <ChainElement>(new ChainElement {
                Name = srv.TempResponse.ResponseUri.AbsoluteUri, IsRoot = true
            });
            List <TreeNode <ChainElement> > tempList = new List <TreeNode <ChainElement> > {
                tree
            };

            for (Int32 index = chain.ChainElements.Count - 1; index >= 0; index--)
            {
                ChainElement temp = new ChainElement {
                    Certificate = srv.TempChain.ChainElements[index].Certificate,
                    Name        = stripName(srv.TempChain.ChainElements[index].Certificate.Subject)
                };
                tree.AddChild(temp);
                temp.PropagatedErrors = tree.Value.NativeErrors;
                tree = tree.Children[0];
                addStatus(tree.Value, chain.ChainStatus);
                addStatus(tree.Value, srv.TempChain.ChainElements.Item(chain.ChainElements[index]).ChainElementStatus);
                extendedCertValidation(tree, chain.ChainElements[index], index);
            }
            bworker.ReportProgress(0, new ReportObject {
                Action = "Add", Index = currentIndex, NewTree = tempList[0]
            });
        }
Beispiel #2
0
        public ActionChain AddAction(IActor actor, IAction action)
        {
            ChainElement newElm = new ChainElement(actor, action);

            AddAction(newElm);

            return(this);
        }
Beispiel #3
0
        public global::System.IDisposable Add(global::System.Func <global::System.Boolean> filter, global::System.Action listener, global::System.Double sequence)
        {
            var element = new ChainElement(filter, listener, sequence);

            _chain.Add(element);
            _chain.Sort((el1, el2) => global::System.Collections.Generic.Comparer <global::System.Double> .Default.Compare(el1.Sequence, el2.Sequence));
            return(new CallbackChainRegistration(() => _chain.Remove(element)));
        }
Beispiel #4
0
        public global::System.IDisposable Add(global::DataVault.Core.Helpers.Func <T1, T2, T3, T4, T5, T6, T7, global::System.Boolean> filter, global::DataVault.Core.Helpers.Func <T1, T2, T3, T4, T5, T6, T7, TResult> listener, global::System.Double sequence)
        {
            var element = new ChainElement(filter, listener, sequence);

            _chain.Add(element);
            _chain.Sort((el1, el2) => global::System.Collections.Generic.Comparer <global::System.Double> .Default.Compare(el1.Sequence, el2.Sequence));
            return(new CallbackChainRegistration(() => _chain.Remove(element)));
        }
Beispiel #5
0
        public ActionChain AddAction(IActor actor, Action action)
        {
            ChainElement newElm = new ChainElement(actor, new ActionEventDelegate(action));

            AddAction(newElm);

            return(this);
        }
Beispiel #6
0
    public SimpleRequestChain Add(ChainElement chainElement)
    {
        var last = _elements.LastOrDefault();

        if (last != null)
        {
            last.NextElement = chainElement;
        }
        chainElement.OnInterrupted += FailCompletionHandler;
        _elements.Add(chainElement);
        return(this);
    }
Beispiel #7
0
 public void AddAction(ChainElement elm)
 {
     if (FirstElement == null)
     {
         FirstElement = elm;
         lastElement  = elm;
     }
     else
     {
         lastElement.Action.RunOnFinish(elm.Actor, elm.Action);
         lastElement = elm;
     }
 }
Beispiel #8
0
        public ActionChain AddAction(ChainElement elm)
        {
            if (FirstElement == null)
            {
                FirstElement = elm;
                lastElement  = elm;
            }
            else
            {
                lastElement.Action.RunOnFinish(elm.Actor, elm.Action);
                lastElement = elm;
            }

            return(this);
        }
Beispiel #9
0
 public void AddChain(ActionChain chain)
 {
     // If we have a chain of our own
     if (lastElement != null)
     {
         lastElement.Action.RunOnFinish(chain.FirstElement.Actor, chain.FirstElement.Action);
         lastElement = chain.lastElement;
     }
     // If we're uninit'd, take their data
     else
     {
         FirstElement = chain.FirstElement;
         lastElement  = chain.lastElement;
     }
 }
Beispiel #10
0
    public void Add(ChainElement chainElement)
    {
        if (_elements.Contains(chainElement))
        {
            return;
        }
        var last = _elements.LastOrDefault();

        if (last != null)
        {
            last.NextElement = chainElement;
        }

        chainElement.OnInterrupted += FailCompletionHandler;
        _elements.Add(chainElement);
    }
Beispiel #11
0
 void addStatus(ChainElement temp, IEnumerable <X509ChainStatus> status)
 {
     if (status == null)
     {
         return;
     }
     foreach (X509ChainStatus flag in status)
     {
         if (flag.Status != X509ChainStatusFlags.NoError && !_warningStatuses.Contains((Int64)flag.Status))
         {
             temp.HasErrors = globalErrors = true;
         }
         if (_warningStatuses.Contains((Int64)flag.Status))
         {
             temp.HasWarnings = globalWarnings = true;
         }
         temp.NativeErrors |= (X509ChainStatusFlags2)flag.Status;
     }
 }
Beispiel #12
0
        void grabInternalChain(X509Chain chain)
        {
            TreeNode <IChainElement> tree = Entry.Response == null
                ? new TreeNode <IChainElement>(new ChainElement {
                Name = Entry.Request.Address.AbsoluteUri, IsRoot = true
            })
                : new TreeNode <IChainElement>(new ChainElement {
                Name = Entry.Response.ResponseUri.AbsoluteUri, IsRoot = true
            });
            List <TreeNode <IChainElement> > tempList = new List <TreeNode <IChainElement> > {
                tree
            };

            for (Int32 index = chain.ChainElements.Count - 1; index >= 0; index--)
            {
                ChainElement temp = new ChainElement {
                    Certificate = Entry.InternalChain.ChainElements[index].Certificate,
                    Name        = Entry.InternalChain.ChainElements[index].Certificate.GetNameInfo(X509NameType.SimpleName, false)
                };
                tree.AddChild(temp);
                temp.PropagatedErrors = tree.Value.NativeErrors;
                tree = tree.Children[0];
                addStatus(tree.Value, chain.ChainStatus.Select(x => new X509ChainStatus2(x)).ToArray());
                addStatus(tree.Value, Entry.InternalChain.ChainElements.Item(chain.ChainElements[index])
                          .ChainElementStatus.Select(x => new X509ChainStatus2(x)).ToArray());
                extendedCertValidation(tree, chain.ChainElements[index], index);
            }

            // this is necessary for stuff like WPF, because of an attempt to update CollectionView in background thread.
            if (syncContext == null)
            {
                NativeEntry.Tree.Add(tempList[0]);
            }
            else
            {
                syncContext.Send(x => NativeEntry.Tree.Add(tempList[0]), null);
            }
        }
Beispiel #13
0
 public ActionChain()
 {
     FirstElement = null;
     lastElement  = null;
 }
Beispiel #14
0
        public ActionChain AddBranch(IActor conditionActor, Func <bool> condition, ChainElement trueBranch, ChainElement falseBranch)
        {
            AddBranch(conditionActor, condition, new ActionChain(trueBranch), new ActionChain(falseBranch));

            return(this);
        }
 public Bearded(ChainElement next) : base(next)
 {
 }
 public Bearded(string owner, ChainElement next) : base(owner, next)
 {
 }
Beispiel #17
0
 public ActionChain(ChainElement elm)
 {
     FirstElement = elm;
     lastElement  = FirstElement;
 }
Beispiel #18
0
 public ChainElementGenerator(ChainElement source)
 {
     this.source = source;
     buffer      = new float[Config.Latency.ToSamples()];
 }
Beispiel #19
0
 public Emotional(string laughingSound, ChainElement next) : base(next)
 {
     this.laughingSound = laughingSound;
 }
Beispiel #20
0
        public void AddAction(IActor actor, Action action)
        {
            ChainElement newElm = new ChainElement(actor, new ActionEventDelegate(action));

            AddAction(newElm);
        }
 public FamilyMember(ChainElement components)
 {
     this.components = components;
 }
Beispiel #22
0
 public override void AddSource(ChainElement source)
 {
     this.Source = source;
 }
Beispiel #23
0
 public override void ClearSource()
 {
     this.Source = null;
 }
Beispiel #24
0
 public ActionChain(IActor firstActor, Action firstAction)
 {
     FirstElement = new ChainElement(firstActor, new ActionEventDelegate(firstAction));
     lastElement  = FirstElement;
 }
Beispiel #25
0
 public ActionChain(IActor firstActor, IAction firstAction)
 {
     FirstElement = new ChainElement(firstActor, firstAction);
     lastElement  = FirstElement;
 }
Beispiel #26
0
 public static ChainElementGenerator ToGenerator(this ChainElement source)
 {
     return(new ChainElementGenerator(source));
 }
 public Hairy(ChainElement next) : base(next)
 {
 }
Beispiel #28
0
        public void AddAction(IActor actor, IAction action)
        {
            ChainElement newElm = new ChainElement(actor, action);

            AddAction(newElm);
        }
 public Hairy(string owner, ChainElement next) : base(owner, next)
 {
 }
 public ChainElement(string owner, ChainElement next)
 {
     Owner           = owner;
     this.next       = next;
     this.next.Owner = owner;
 }