Esempio n. 1
0
        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];
                result.CanonicalModel = modelMetadata.CanonicalModel;
                result.Comments       = modelMetadata.Comments;
                result.IsResolved     = true;
            }

            return(result);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        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 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 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];
                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 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;
        }