Exemplo n.º 1
0
        private string GetNameWithoutGenericArity(Type t)
        {
            string name = t.Name;

            if (t.IsInterface && name.StartsWith("I"))
            {
                name = name.Substring(1);
            }

            if (t.IsArray)
            {
                string arrayElementName = _nameCreator.CreateName(t.GetElementType());
                name = $"ArrayOf{arrayElementName}";
            }

            int index = name.IndexOf('`');

            return(index == -1 ? name : name.Substring(0, index));
        }
Exemplo n.º 2
0
 public void AddType <T>()
 {
     _types.Add(_nameCreator.CreateName(typeof(T)), typeof(T));
 }