Ejemplo n.º 1
0
 private void SetTreeModelInternal(AssemblyTreeModel treeModel)
 {
     m_TreeModel                = treeModel;
     m_TreeModel.FilterIO       = cbxIOFilter.Checked;
     m_TreeModel.FilterNet      = cbxNetFilter.Checked;
     m_TreeModel.FilterSecurity = cbxCryptoFilter.Checked;
     trvAssemblies.Model        = m_TreeModel;
 }
Ejemplo n.º 2
0
 public void SetTreeModel(AssemblyTreeModel treeModel)
 {
     if (InvokeRequired)
     {
         BeginInvoke(new Action <AssemblyTreeModel>(SetTreeModelInternal), treeModel);
     }
     else
     {
         SetTreeModelInternal(treeModel);
     }
 }
Ejemplo n.º 3
0
    public static FilterCollection <AssemblyTreeModel> ToFilterModels(this IEnumerable <ReferenceModel> references, Predicate <object> predicate)
    {
        var models = references.Select(x =>
        {
            var subItem = x.LoadedAssembly.References.Select(r => new AssemblyTreeModel(r));

            var item = new AssemblyTreeModel(x)
            {
                Collection = new FilterCollection <AssemblyTreeModel>(subItem, predicate, nameof(AssemblyTreeModel.AssemblyFullName))
            };

            return(item);
        });

        return(new FilterCollection <AssemblyTreeModel>(models, predicate, nameof(AssemblyTreeModel.AssemblyFullName)));
    }