コード例 #1
0
        public int GetGmuIdInt32 <T>(T value)
            where T : IConvertible
        {
            using (ILogMethod method = Log.LogMethod(this.DYN_MODULE_NAME, "GetGmuId"))
            {
                int result = default(int);

                try
                {
                    IFFEnumParser parser = _parsers.GetValueFromKey2(typeof(T).FullName);
                    if (parser != null)
                    {
                        result = parser.GetGmuIdFromAppId(value.ToInt32(CULTURE));
                    }
                }
                catch (Exception ex)
                {
                    method.Exception(ex);
                }

                return(result);
            }
        }
コード例 #2
0
        public S GetGmuId <T, S>(int value)
            where T : IConvertible
            where S : IConvertible
        {
            using (ILogMethod method = Log.LogMethod(this.DYN_MODULE_NAME, "GetGmuId"))
            {
                S result = default(S);

                try
                {
                    IFFEnumParser parser = _parsers.GetValueFromKey2(typeof(T).FullName);
                    if (parser != null)
                    {
                        result = TypeSystem.GetValueEnumGeneric2 <S>(parser.GetGmuIdFromAppId(value), default(S));
                    }
                }
                catch (Exception ex)
                {
                    method.Exception(ex);
                }

                return(result);
            }
        }