private static void PopulateCache() { var sourceAssembly = CSRequest.SyncRequestType.Assembly; #if BCL var allTypes = sourceAssembly.GetTypes(); #else var allTypesInfos = sourceAssembly.DefinedTypes; var allTypes = new List <Type>(); foreach (var typeInfo in allTypesInfos) { allTypes.Add(typeInfo.AsType()); } #endif // Look up all CognitoSync request objects for caching. foreach (var type in allTypes) { var typeInfo = TypeFactory.GetTypeInfo(type); if (CSRequest.SyncRequestType.IsAssignableFrom(typeInfo) && !typeInfo.Equals(CSRequest.SyncRequestType)) { var csRequest = new CSRequest(type); requestCache[type] = csRequest; } } }
private static void PopulateCache() { var sourceAssembly = CSRequest.SyncRequestType.Assembly; var allTypes = sourceAssembly.GetTypes(); // Look up all CognitoSync request objects for caching. foreach (var type in allTypes) { var typeInfo = TypeFactory.GetTypeInfo(type); if (CSRequest.SyncRequestType.IsAssignableFrom(typeInfo) && !typeInfo.Equals(CSRequest.SyncRequestType)) { var csRequest = new CSRequest(type); requestCache[type] = csRequest; } } }