示例#1
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="provider"></param>
        public static void Register(ITagFormatProvider provider)
        {
            Guard.NotNull(provider, "provider");
            var fmts = provider.SupportColon ? colonFormatters : formatters;

            if (fmts.ContainsKey(provider.Tag))
                fmts.Remove(provider.Tag);
            fmts.Add(provider.Tag, provider);
        }
示例#2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="provider"></param>
        public static void Register(ITagFormatProvider provider)
        {
            Guard.NotNull(provider, "provider");
            var fmts = provider.SupportColon ? colonFormatters : formatters;

            if (fmts.ContainsKey(provider.Tag))
            {
                fmts.Remove(provider.Tag);
            }
            fmts.Add(provider.Tag, provider);
        }