I need to merge these 3 properties in just a general one.
How can I do it??
public class BonusImageHandler
{
private static IStorageProvider _BAstorageProvider; // 1
private static IStorageProvider _BAWP8storageProvider; // 2
private static IStorageProvider _M4MstorageProvider; // 3
private static IStorageProvider BAStorageProvider // for 1
{
get
{ var storageProviderType = Type.GetType("BAStorageProviderTypeName");
_BAstorageProvider = (IStorageProvider)Activator.CreateInstance(storageProviderType);
return _BAstorageProvider;
}
}
////////////////////////////////////////////////////
private static IStorageProvider BAWP8StorageProvider // for 2
{
get
{ var storageProviderType = Type.GetType("BAWP8StorageProviderTypeName");
_BAWP8storageProvider = (IStorageProvider)Activator.CreateInstance(storageProviderType);
return _BAWP8storageProvider;
}
}
////////////////////////////////////////////////////////
private static IStorageProvider M4MStorageProvider // for 3
{
get
{ var storageProviderType = Type.GetType("M4MStorageProviderTypeName");
_M4MstorageProvider= (IStorageProvider)Activator.CreateInstance(storageProviderType);
return _M4MstorageProvider;
}
}
}