private static CanonicalPhoneName ResolveHtc(string manufacturer, string model)
        {
            var modelNormalized = model.Trim().ToUpper();

            var result = new CanonicalPhoneName()
            {
                ReportedManufacturer  = manufacturer,
                ReportedModel         = model,
                CanonicalManufacturer = "HTC",
                CanonicalModel        = model,
                IsResolved            = false
            };


            var lookupValue = modelNormalized;

            if (lookupValue.StartsWith("A620"))
            {
                lookupValue = "A620";
            }

            if (lookupValue.StartsWith("C625"))
            {
                lookupValue = "C625";
            }

            if (lookupValue.StartsWith("C620"))
            {
                lookupValue = "C620";
            }

            if (htcLookupTable.ContainsKey(lookupValue))
            {
                var modelMetadata = htcLookupTable[lookupValue];
                result.CanonicalModel = modelMetadata.CanonicalModel;
                result.Comments       = modelMetadata.Comments;
                result.IsResolved     = true;
            }

            return(result);
        }
        private static CanonicalPhoneName ResolveHuawei(string manufacturer, string model)
        {
            var modelNormalized = model.Trim().ToUpper();

            var result = new CanonicalPhoneName()
            {
                ReportedManufacturer  = manufacturer,
                ReportedModel         = model,
                CanonicalManufacturer = "HUAWEI",
                CanonicalModel        = model,
                IsResolved            = false
            };


            var lookupValue = modelNormalized;

            if (lookupValue.StartsWith("HUAWEI H883G"))
            {
                lookupValue = "HUAWEI H883G";
            }

            if (lookupValue.StartsWith("HUAWEI W1"))
            {
                lookupValue = "HUAWEI W1";
            }

            if (modelNormalized.StartsWith("HUAWEI W2"))
            {
                lookupValue = "HUAWEI W2";
            }

            if (huaweiLookupTable.ContainsKey(lookupValue))
            {
                var modelMetadata = huaweiLookupTable[lookupValue];
                result.CanonicalModel = modelMetadata.CanonicalModel;
                result.Comments       = modelMetadata.Comments;
                result.IsResolved     = true;
            }

            return(result);
        }
        private static CanonicalPhoneName ResolveHuawei(string manufacturer, string model)
        {
            var modelNormalized = model.Trim().ToUpper();

            var result = new CanonicalPhoneName()
            {
                ReportedManufacturer = manufacturer,
                ReportedModel = model,
                CanonicalManufacturer = "HUAWEI",
                CanonicalModel = model,
                IsResolved = false
            };


            var lookupValue = modelNormalized;

            if (lookupValue.StartsWith("HUAWEI H883G"))
            {
                lookupValue = "HUAWEI H883G";
            }

            if (lookupValue.StartsWith("HUAWEI W1"))
            {
                lookupValue = "HUAWEI W1";
            }

            if (modelNormalized.StartsWith("HUAWEI W2"))
            {
                lookupValue = "HUAWEI W2";
            }

            if (huaweiLookupTable.ContainsKey(lookupValue))
            {
                var modelMetadata = huaweiLookupTable[lookupValue];
                result.CanonicalModel = modelMetadata.CanonicalModel;
                result.Comments = modelMetadata.Comments;
                result.IsResolved = true;
            }

            return result;
        }
        private static CanonicalPhoneName ResolveNokia(string manufacturer, string model)
        {
            var modelNormalized = model.Trim().ToUpper();

            var result = new CanonicalPhoneName()
            {
                ReportedManufacturer  = manufacturer,
                ReportedModel         = model,
                CanonicalManufacturer = "NOKIA",
                CanonicalModel        = model,
                IsResolved            = false
            };

            var lookupValue = modelNormalized;

            if (modelNormalized.StartsWith("RM-"))
            {
                var rms = Regex.Match(modelNormalized, "(RM-)([0-9]+)");
                lookupValue = rms.Value;
            }

            if (nokiaLookupTable.ContainsKey(lookupValue))
            {
                var modelMetadata = nokiaLookupTable[lookupValue];

                if (!string.IsNullOrEmpty(modelMetadata.CanonicalManufacturer))
                {
                    result.CanonicalManufacturer = modelMetadata.CanonicalManufacturer;
                }
                result.CanonicalModel = modelMetadata.CanonicalModel;
                result.Comments       = modelMetadata.Comments;
                result.IsResolved     = true;
            }

            return(result);
        }
        private static CanonicalPhoneName ResolveSamsung(string manufacturer, string model)
        {
            var modelNormalized = model.Trim().ToUpper();

            var result = new CanonicalPhoneName()
            {
                ReportedManufacturer  = manufacturer,
                ReportedModel         = model,
                CanonicalManufacturer = "SAMSUNG",
                CanonicalModel        = model,
                IsResolved            = false
            };


            var lookupValue = modelNormalized;

            if (lookupValue.StartsWith("GT-S7530"))
            {
                lookupValue = "GT-S7530";
            }

            if (lookupValue.StartsWith("SGH-I917"))
            {
                lookupValue = "SGH-I917";
            }

            if (samsungLookupTable.ContainsKey(lookupValue))
            {
                var modelMetadata = samsungLookupTable[lookupValue];
                result.CanonicalModel = modelMetadata.CanonicalModel;
                result.Comments       = modelMetadata.Comments;
                result.IsResolved     = true;
            }

            return(result);
        }
        private static CanonicalPhoneName ResolveLg(string manufacturer, string model)
        {
            var modelNormalized = model.Trim().ToUpper();

            var result = new CanonicalPhoneName()
            {
                ReportedManufacturer = manufacturer,
                ReportedModel = model,
                CanonicalManufacturer = "LG",
                CanonicalModel = model,
                IsResolved = false
            };


            var lookupValue = modelNormalized;

            if (lookupValue.StartsWith("LG-C900"))
            {
                lookupValue = "LG-C900";
            }

            if (lookupValue.StartsWith("LG-E900"))
            {
                lookupValue = "LG-E900";
            }

            if (lgLookupTable.ContainsKey(lookupValue))
            {
                var modelMetadata = lgLookupTable[lookupValue];
                result.CanonicalModel = modelMetadata.CanonicalModel;
                result.Comments = modelMetadata.Comments;
                result.IsResolved = true;
            }

            return result;
        }
        private static CanonicalPhoneName ResolveNokia(string manufacturer, string model)
        {
            var modelNormalized = model.Trim().ToUpper();

            var result = new CanonicalPhoneName()
            {
                ReportedManufacturer = manufacturer,
                ReportedModel = model,
                CanonicalManufacturer = "NOKIA",
                CanonicalModel = model,
                IsResolved = false
            };

            var lookupValue = modelNormalized;
            if (modelNormalized.StartsWith("RM-"))
            {
                var rms = Regex.Match(modelNormalized, "(RM-)([0-9]+)");
                lookupValue = rms.Value;
            }

            if (nokiaLookupTable.ContainsKey(lookupValue))
            {
                var modelMetadata = nokiaLookupTable[lookupValue];

                if (!string.IsNullOrEmpty(modelMetadata.CanonicalManufacturer))
                {
                    result.CanonicalManufacturer = modelMetadata.CanonicalManufacturer;
                }
                result.CanonicalModel = modelMetadata.CanonicalModel;
                result.Comments = modelMetadata.Comments;
                result.IsResolved = true;
            }

            return result;
        }