Ejemplo n.º 1
0
 private static T ReflectiveInstantiate <T>(Tx.Profile prf) where T : Profile
 {
     if (!(typeof(T).GetConstructor(new Type[] { typeof(Tx.Profile) })?.Invoke(new object[] { prf }) is T output))
     {
         throw new Exception($"Failed to instantiate ProfileTools.Profile subclass {typeof(T).Name}. Does it have a constructor that accepts an argument of Tx.Profile?");
     }
     return(output);
 }
Ejemplo n.º 2
0
 private void Update()
 {
     if (PylonsService.instance == null)
     {
         throw new PylonsUtilSceneNotLoadedException();
     }
     else
     {
         PylonsService.instance.GetProfile("", (s, p) =>
         {
             last       = p;
             lastHeight = StatusBlock.Last.BlockHeight;
         });
     }
 }
Ejemplo n.º 3
0
 public Profile(Tx.Profile prf)
 {
     last       = prf;
     lastHeight = StatusBlock.Last.BlockHeight;
 }