Example #1
0
            internal DeepFreezer(object a)
            {
                _actualDeepFreezer = a;
                //Fields available from Freezer part

                //FreezerSizeMethod = DeepFreezerType.GetMethod("get_DFIFreezerSize", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance);
                //FreezerSize = getFreezerSize;
                _totalFrozenMethod    = DeepFreezerType.GetMethod("get_DFITotalFrozen", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance);
                TotalFrozen           = GetTotalFrozen;
                _freezerSpaceMethod   = DeepFreezerType.GetMethod("get_DFIFreezerSpace", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance);
                FreezerSpace          = GetFreezerSpace;
                _partFullMethod       = DeepFreezerType.GetMethod("get_DFIPartFull", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance);
                PartFull              = GetPartFull;
                _isFreezeActiveMethod = DeepFreezerType.GetMethod("get_DFIIsFreezeActive", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance);
                IsFreezeActive        = GetIsFreezeActive;
                _isThawActiveMethod   = DeepFreezerType.GetMethod("get_DFIIsThawActive", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance);
                IsThawActive          = GetIsThawActive;
                _freezerOutofEcMethod = DeepFreezerType.GetMethod("get_DFIFreezerOutofEC", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance);
                FreezerOutofEc        = GetFreezerOutofEc;
                _frzrTmpMethod        = DeepFreezerType.GetMethod("get_DFIFrzrTmp", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance);
                FrzrTmp = GetFrzrTmp;
                _storedCrewListMethod = DeepFreezerType.GetMethod("get_DFIStoredCrewList", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance);
                _actualStoredCrewList = _storedCrewListMethod.Invoke(_actualDeepFreezer, null);

                //Methods
                //LogFormatted("Getting beginFreezeKerbalMethod Method");
                _beginFreezeKerbalMethod = DeepFreezerType.GetMethod("beginFreezeKerbal", BindingFlags.Public | BindingFlags.Instance);
                //LogFormatted_DebugOnly($"Success: {beginFreezeKerbalMethod != null}");

                //LogFormatted("Getting beginThawKerbalMethod Method");
                _beginThawKerbalMethod = DeepFreezerType.GetMethod("beginThawKerbal", BindingFlags.Public | BindingFlags.Instance);
                //LogFormatted_DebugOnly($"Success: {beginThawKerbalMethod != null}");
            }
Example #2
0
            internal DeepFreezer(Object a)
            {
                actualDeepFreezer = a;
                //Fields available from Freezer part
                crewXferTOActiveMethod   = DeepFreezerType.GetMethod("get_DFIcrewXferTOActive", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance);
                crewXferTOActive         = getcrewXferTOActive;
                crewXferFROMActiveMethod = DeepFreezerType.GetMethod("get_DFIcrewXferFROMActive", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance);
                crewXferFROMActive       = getcrewXferFROMActive;
                FreezerSizeMethod        = DeepFreezerType.GetMethod("get_DFIFreezerSize", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance);
                FreezerSize          = getFreezerSize;
                TotalFrozenMethod    = DeepFreezerType.GetMethod("get_DFITotalFrozen", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance);
                TotalFrozen          = getTotalFrozen;
                FreezerSpaceMethod   = DeepFreezerType.GetMethod("get_DFIFreezerSpace", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance);
                FreezerSpace         = getFreezerSpace;
                PartFullMethod       = DeepFreezerType.GetMethod("get_DFIPartFull", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance);
                PartFull             = getPartFull;
                IsFreezeActiveMethod = DeepFreezerType.GetMethod("get_DFIIsFreezeActive", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance);
                IsFreezeActive       = getIsFreezeActive;
                IsThawActiveMethod   = DeepFreezerType.GetMethod("get_DFIIsThawActive", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance);
                IsThawActive         = getIsThawActive;
                FreezerOutofECMethod = DeepFreezerType.GetMethod("get_DFIFreezerOutofEC", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance);
                FreezerOutofEC       = getFreezerOutofEC;
                FrzrTmpMethod        = DeepFreezerType.GetMethod("get_DFIFrzrTmp", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance);
                FrzrTmp = getFrzrTmp;
                FrznChargeUsageMethod = DeepFreezerType.GetMethod("get_DFIFrznChargeUsage", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance);
                FrznChargeUsage       = getFrznChargeUsage;
                StoredCrewListMethod  = DeepFreezerType.GetMethod("get_DFIStoredCrewList", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance);
                actualStoredCrewList  = StoredCrewListMethod.Invoke(actualDeepFreezer, null);
                ECReqdMethod          = DeepFreezerType.GetMethod("get_DFIECReqd", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance);
                ECReqd = getECReqd;
                FrznChargeRequiredMethod = DeepFreezerType.GetMethod("get_DFIFrznChargeRequired", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance);
                FrznChargeRequired       = getFrznChargeRequired;

                //Methods
                //LogFormatted("Getting beginFreezeKerbalMethod Method");
                beginFreezeKerbalMethod = DeepFreezerType.GetMethod("beginFreezeKerbal", BindingFlags.Public | BindingFlags.Instance);
                //LogFormatted_DebugOnly("Success: " + (beginFreezeKerbalMethod != null).ToString());

                //LogFormatted("Getting beginThawKerbalMethod Method");
                beginThawKerbalMethod = DeepFreezerType.GetMethod("beginThawKerbal", BindingFlags.Public | BindingFlags.Instance);
                //LogFormatted_DebugOnly("Success: " + (beginThawKerbalMethod != null).ToString());
            }