static NoggolloquyRegistration() { foreach (var interf in TypeExt.GetInheritingFromInterface <IProtocolRegistration>( loadAssemblies: false)) { IProtocolRegistration regis = Activator.CreateInstance(interf) as IProtocolRegistration; regis.Register(); } }
static LinkInterfaceMappingInternal() { if (!LinkInterfaceMapping.AutomaticRegistration) { return; } foreach (var interf in TypeExt.GetInheritingFromInterface <ILinkInterfaceMapping>( loadAssemblies: true)) { ILinkInterfaceMapping?mapping = Activator.CreateInstance(interf) as ILinkInterfaceMapping; Mappings[mapping !.GameCategory] = mapping !.InterfaceToObjectTypes;
static LinkInterfaceMappingInternal() { if (!LinkInterfaceMapping.AutomaticRegistration) { return; } foreach (var interf in TypeExt.GetInheritingFromInterface <ILinkInterfaceMapping>( loadAssemblies: true)) { Register((Activator.CreateInstance(interf) as ILinkInterfaceMapping) !); } }