Пример #1
0
 public TypeItem(string type, int score, IMatchScorer scorer) : base(type, scorer)
 {
     Score = score;
     string[] parts = type.Split('.');
     Name         = parts[parts.Length - 1];
     Namespace    = string.Join(".", parts.Take(parts.Length - 1));
     FullTypeName = type;
 }
Пример #2
0
            public MethodItem(ISourceMethod method, int score, IMatchScorer scorer)
                : base(method.Name, scorer)
            {
                mMethod = method;
                Score   = score;
                var typeParts = mMethod.ParentType.Split('.');

                TypeName  = typeParts.LastOrDefault() ?? string.Empty;
                Namespace = string.Join(".", typeParts.Take(typeParts.Length - 1));
            }