コード例 #1
0
        private string CreateConvention(int number)
        {
            var result = "_" + Convert.ToString(number, 16);

            if (UsingDictionary.ContainsConvention(result))
            {
                return(CreateConvention(number + 1));
            }
            return(result);
        }
コード例 #2
0
        public Type TypeOf(string convention)
        {
            Type type;

            if (!UsingDictionary.TryGetType(convention, out type))
            {
                throw new ArgumentException("convention");
            }
            return(type);
        }
コード例 #3
0
        public string ConventionOf(Type type)
        {
            string convention;

            if (!UsingDictionary.TryGetConvention(type, out convention))
            {
                convention = GetNewValidConvention(type);
                UsingDictionary.AddConventionInternal(type, convention);
            }
            return(convention);
        }