internal static void GetSubsystemDescriptors <T>(List <T> descriptors) where T : ISubsystemDescriptor { descriptors.Clear(); SubsystemDescriptorStore.AddDescriptorSubset <IntegratedSubsystemDescriptor, T>(SubsystemDescriptorStore.s_IntegratedDescriptors, descriptors); SubsystemDescriptorStore.AddDescriptorSubset <SubsystemDescriptorWithProvider, T>(SubsystemDescriptorStore.s_StandaloneDescriptors, descriptors); SubsystemDescriptorStore.AddDescriptorSubset <SubsystemDescriptor, T>(SubsystemDescriptorStore.s_DeprecatedDescriptors, descriptors); }
internal static void GetAllSubsystemDescriptors(List <ISubsystemDescriptor> descriptors) { descriptors.Clear(); int num = SubsystemDescriptorStore.s_IntegratedDescriptors.Count + SubsystemDescriptorStore.s_StandaloneDescriptors.Count + SubsystemDescriptorStore.s_DeprecatedDescriptors.Count; bool flag = descriptors.Capacity < num; if (flag) { descriptors.Capacity = num; } SubsystemDescriptorStore.AddDescriptorSubset <IntegratedSubsystemDescriptor>(SubsystemDescriptorStore.s_IntegratedDescriptors, descriptors); SubsystemDescriptorStore.AddDescriptorSubset <SubsystemDescriptorWithProvider>(SubsystemDescriptorStore.s_StandaloneDescriptors, descriptors); SubsystemDescriptorStore.AddDescriptorSubset <SubsystemDescriptor>(SubsystemDescriptorStore.s_DeprecatedDescriptors, descriptors); }
internal static void RegisterDescriptor <TDescriptor, TBaseTypeInList>(TDescriptor descriptor, List <TBaseTypeInList> storeInList) where TDescriptor : TBaseTypeInList where TBaseTypeInList : ISubsystemDescriptor { for (int i = 0; i < storeInList.Count; i++) { TBaseTypeInList tBaseTypeInList = storeInList[i]; bool flag = tBaseTypeInList.id != descriptor.id; if (!flag) { Debug.LogWarning(string.Format("Registering subsystem descriptor with duplicate ID '{descriptor.id}' - overwriting previous entry.", new object[0])); storeInList[i] = (TBaseTypeInList)((object)descriptor); return; } } SubsystemDescriptorStore.ReportSingleSubsystemAnalytics(descriptor.id); storeInList.Add((TBaseTypeInList)((object)descriptor)); }
public static void RegisterDescriptor(SubsystemDescriptorWithProvider descriptor) { descriptor.ThrowIfInvalid(); SubsystemDescriptorStore.RegisterDescriptor <SubsystemDescriptorWithProvider, SubsystemDescriptorWithProvider>(descriptor, SubsystemDescriptorStore.s_StandaloneDescriptors); }
internal static void RegisterDeprecatedDescriptor(SubsystemDescriptor descriptor) { SubsystemDescriptorStore.RegisterDescriptor <SubsystemDescriptor, SubsystemDescriptor>(descriptor, SubsystemDescriptorStore.s_DeprecatedDescriptors); }