Ejemplo n.º 1
0
 public ClassViewProject(IProjectFactory factory, IServiceProvider serviceProvider)
     : base(factory, serviceProvider)
 {
     this._rootItem = new ClassBrowserProjectItem(this);
     this._projectData = new ClassViewProjectData();
     this._projectData.Load(serviceProvider);
 }
Ejemplo n.º 2
0
 public ClassViewPageBuilder(ClassViewProjectData projectData, TypeDocument document)
 {
     this._projectData = projectData;
     this._document = document;
     base.SetPageColors(Color.Black, Color.LightGoldenrodYellow, Color.DarkGreen, Color.Green);
     base.SetPageMargins(new BoxEdges(10, 10, 10, 10));
     base.SetPageFont("Tahoma", 8f);
 }
Ejemplo n.º 3
0
 public object Create(object parent, object configContext, XmlNode section)
 {
     ClassViewProjectData data = new ClassViewProjectData();
     foreach (XmlNode node in section.ChildNodes)
     {
         if ((node.NodeType != XmlNodeType.Whitespace) && (node.NodeType != XmlNodeType.Comment))
         {
             if (node.NodeType == XmlNodeType.Element)
             {
                 if (node.Name.Equals("assembly"))
                 {
                     XmlAttribute attribute = node.Attributes["name"];
                     if ((attribute == null) || (attribute.Value.Length == 0))
                     {
                         throw new ConfigurationException("Missing required attribute 'name'", node);
                     }
                     XmlAttribute attribute2 = node.Attributes["displayName"];
                     if ((attribute2 == null) || (attribute2.Value.Length == 0))
                     {
                         throw new ConfigurationException("Missing required attribute 'displayName'", node);
                     }
                     try
                     {
                         data.AddAssemblyEntry(attribute.Value, attribute2.Value);
                         continue;
                     }
                     catch
                     {
                         throw new ConfigurationException("Invalid assembly entry", node);
                     }
                 }
                 if (node.Name.Equals("group"))
                 {
                     XmlAttribute attribute3 = node.Attributes["name"];
                     if ((attribute3 == null) || (attribute3.Value.Length == 0))
                     {
                         throw new ConfigurationException("Missing required attribute 'name'", node);
                     }
                     ArrayList items = this.ProcessGroup(node);
                     try
                     {
                         data.AddGroupEntry(attribute3.Value, items);
                         continue;
                     }
                     catch
                     {
                         throw new ConfigurationException("Invalid group entry", node);
                     }
                 }
             }
             throw new ConfigurationException("Unexpected XML node type", node);
         }
     }
     return data;
 }
Ejemplo n.º 4
0
        public static TypeSearchTask CreateReferenceSearchTask(ClassViewProjectData projectData, Type searchType, ReferenceSearchMode mode)
        {
            if (searchType != null)
            {
                switch (mode)
                {
                    case ReferenceSearchMode.BaseType:
                        return new TypeBaseTypeSearchTask(projectData, searchType, false);

                    case ReferenceSearchMode.BaseTypeDirect:
                        return new TypeBaseTypeSearchTask(projectData, searchType, true);

                    case ReferenceSearchMode.Implements:
                        return new TypeImplementsSearchTask(projectData, searchType);

                    case ReferenceSearchMode.Member:
                        return new TypeMemberTypeSearchTask(projectData, searchType);
                }
            }
            return null;
        }
Ejemplo n.º 5
0
 public AssemblyProjectItem(ClassViewProjectData.AssemblyEntry assemblyEntry)
     : base(assemblyEntry.Name)
 {
     base.SetIconIndex(2);
     this._assemblyEntry = assemblyEntry;
 }
Ejemplo n.º 6
0
 public TypeImplementsSearchTask(ClassViewProjectData projectData, Type searchType)
     : base(projectData)
 {
     this._searchType = searchType;
 }
Ejemplo n.º 7
0
 internal TypeMemberTypeSearchTask(ClassViewProjectData projectData, Type searchType)
     : base(projectData, 1)
 {
     this._searchType = searchType;
 }
Ejemplo n.º 8
0
 internal TypeNameSearchTask(ClassViewProjectData projectData, string searchValue)
     : base(projectData)
 {
     this._searchValue = searchValue.ToLower();
     this._useFullName = searchValue.IndexOf('.') >= 0;
 }
Ejemplo n.º 9
0
 public GroupProjectItem(ClassViewProjectData.GroupEntry group)
     : base(group.Name)
 {
     this._group = group;
     base.SetIconIndex(1);
 }
Ejemplo n.º 10
0
 public static TypeSearchTask CreateSearchTask(ClassViewProjectData projectData, string searchValue)
 {
     if ((searchValue == null) || (searchValue.Length == 0))
     {
         return null;
     }
     if (!searchValue.StartsWith("::"))
     {
         return new TypeNameSearchTask(projectData, searchValue);
     }
     searchValue = searchValue.Substring(2);
     if (searchValue.Length == 0)
     {
         return null;
     }
     return new TypeMemberNameSearchTask(projectData, searchValue);
 }
Ejemplo n.º 11
0
 protected TypeSearchTask(ClassViewProjectData projectData, int searchResultsIncrement)
 {
     this._projectData = projectData;
     this._searchResultsIncrement = searchResultsIncrement;
 }
Ejemplo n.º 12
0
 protected TypeSearchTask(ClassViewProjectData projectData)
     : this(projectData, 5)
 {
 }
Ejemplo n.º 13
0
 public TypePageBuilder(ClassViewProjectData projectData, TypeDocument document)
     : base(projectData, document)
 {
 }
Ejemplo n.º 14
0
 public MemberPageBuilder(ClassViewProjectData projectData, TypeDocument document, TypeDocumentItem item)
     : base(projectData, document)
 {
     this._item = item;
 }
Ejemplo n.º 15
0
 public TypeMemberNameSearchTask(ClassViewProjectData projectData, string searchValue)
     : base(projectData, 1)
 {
     this._searchValue = searchValue.ToLower();
 }
Ejemplo n.º 16
0
 public TypeBaseTypeSearchTask(ClassViewProjectData projectData, Type searchType, bool directOnly)
     : base(projectData)
 {
     this._searchType = searchType;
     this._directOnly = directOnly;
 }