private string CreateConvention(int number) { var result = "_" + Convert.ToString(number, 16); if (UsingDictionary.ContainsConvention(result)) { return(CreateConvention(number + 1)); } return(result); }
public Type TypeOf(string convention) { Type type; if (!UsingDictionary.TryGetType(convention, out type)) { throw new ArgumentException("convention"); } return(type); }
public string ConventionOf(Type type) { string convention; if (!UsingDictionary.TryGetConvention(type, out convention)) { convention = GetNewValidConvention(type); UsingDictionary.AddConventionInternal(type, convention); } return(convention); }