Beispiel #1
0
 internal void RegisterBinaryTypes(IEnumerable <Type> binaryTypes) => binaryTypes
 .OrderBy(t => t.RESTarTypeName())
 .ForEach(type =>
 {
     var resource = (IResource)BuildBinaryMethod.MakeGenericMethod(type).Invoke(this, null);
     RESTarConfig.AddResource(resource);
 });
 internal void RegisterEventTypes(IEnumerable <Type> eventTypes) => eventTypes
 .OrderBy(t => t.RESTarTypeName())
 .ForEach(type =>
 {
     var payloadType = type.GetGenericTypeParameters(typeof(Event <>))[0];
     var resource    = (IResource)BuildEventMethod.MakeGenericMethod(type, payloadType).Invoke(this, null);
     RESTarConfig.AddResource(resource);
 });
Beispiel #3
0
 internal void RegisterTerminalTypes(List <Type> terminalTypes)
 {
     terminalTypes.OrderBy(t => t.RESTarTypeName()).ForEach(type =>
     {
         var resource = (IResource)BuildTerminalMethod.MakeGenericMethod(type).Invoke(this, null);
         RESTarConfig.AddResource(resource);
     });
     Shell.TerminalResource = Meta.TerminalResource <Shell> .Get;
 }