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;
}