/// <summary>Instruments assembly with AsmZ resolver.</summary> /// <param name="targetAssembly">The target assembly.</param> protected static void InstrumentAsmZ(AssemblyDefinition targetAssembly) { var helper = new InstrumentHelper(targetAssembly); helper.InjectLibZInitializer(); helper.InjectAsmZResolver(); }
public async Task CleanUpScenario() { InstrumentHelper.GetInstance().UninstallSurvey(); await CloudStorageHelper.GetInstance().DeleteFileInBucketAsync( BlaiseConfigurationHelper.InstrumentPackageBucket, BlaiseConfigurationHelper.InstrumentPackage); }
// Use this for initialization void Start() { foreach (var instrument in InstrumentHelper.GetInstrumentList()) { var row = GetRowForInstrument(instrument); row.Init(InstrumentHelper.GetColorForInstrument(instrument)); } }
public void Update() { foreach (var instrument in InstrumentHelper.GetInstrumentList()) { CheckInstrument(instrument); } Input.ResetInputAxes(); }
public static void SetupUpFeature() { if (StubConfigurationHelper.UseStubs) { return; } InstrumentHelper.GetInstance().InstallSurvey(); }
public static List <string> GetInstrumentNames() { List <string> inames = new List <string>(); foreach (var inst in InstrumentHelper.getenums <InstrumentGuide>().Select(i => i.ToString())) { inames.Add(inst); } foreach (var inst in InstrumentHelper.getenums <InstrumentGuide>().Select(i => i.ToString())) { inames.Add(inst); } inames.Sort(); return(inames); }
private void Awake() { _score = this.transform.GetComponentInParent <Score>(); _rectTransform = (RectTransform)this.transform; _rowList = new List <Row>(); foreach (var instrument in InstrumentHelper.GetInstrumentList()) { var row = GetRowForInstrument(instrument); if (row != null) { _rowList.Add(row); } } }
public void Init(MeasureConfig config) { _rectTransform = (RectTransform)this.transform; _rowList = new List <Row>(); var instrumentList = InstrumentHelper.GetInstrumentList(); foreach (var instrument in instrumentList) { List <NoteConfig> noteList; if (!config.notes.TryGetValue(instrument, out noteList)) { noteList = new List <NoteConfig>(); } var row = Instantiate(rowPrefab, rowHolder); row.Init(InstrumentHelper.GetColorForInstrument(instrument), noteList); _rowList.Add(row); SetRowForInstrument(instrument, row); } }
// ************************************************************ // CONSTRUCTORS // ************************************************************ // Constructors public InvestmentStrategy(SimulationParameters simulationParameters, InstrumentHelper parameters) { _simulationParameters = simulationParameters; }
public static void CleanUpScenario() { CaseHelper.GetInstance().DeleteCases(); InstrumentHelper.GetInstance().UninstallSurvey(); }
public void CleanUpScenario() { CaseHelper.GetInstance().DeleteCases(); InstrumentHelper.GetInstance().UninstallSurvey(); FileSystemHelper.GetInstance().CleanUpTempFiles(_tempFilePath); }
public static void CleanUpScenario() { InstrumentHelper.GetInstance().UninstallSurvey(); }
public static void GetHelp(DebugDelegate d, HelpType type) { setd(d); const string cmd = "TinyAdiago"; List <string> lines = new List <string>(); switch (type) { case HelpType.General: { lines.Add(cmd + " Usage Help:"); List <string> opts = new List <string>(); foreach (var ht in InstrumentHelper.getenums <HelpType>()) { if (ht == HelpType.General) { continue; } if (ht == HelpType.None) { continue; } opts.Add(ht.ToString()); } lines.Add(cmd + " " + string.Join("|", opts)); } break; case HelpType.Instrument: { lines.Add(cmd + " Valid filename.txt instruments (instrument sound will depend onyour sound device and MIDI sound fonts):"); foreach (var ig in GetInstrumentNames().Take(10)) { foreach (var i in GetInstrumentNames()) { lines.Add(i); } } } break; case HelpType.Filename: { lines.Add(cmd + " <PathToFilename.txt"); lines.Add(cmd + "eg: '" + cmd + " AFS.txt'"); } break; case HelpType.None: break; default: { lines.Add(cmd + " " + type); } break; } foreach (var line in lines) { debug(line); } }
public void GivenThereIsAnInstrumentInstalledOnABlaiseEnvironment() { InstrumentHelper.GetInstance().InstallSurvey(); Assert.IsTrue(InstrumentHelper.GetInstance().SurveyHasInstalled(60)); }
public void GivenTheQuestionnaireIsActive() { var surveyIsActive = InstrumentHelper.GetInstance().SetSurveyAsActive(60); Assert.IsTrue(surveyIsActive); }
public static void SetupUpFeature() { InstrumentHelper.GetInstance().InstallSurvey(); }
public void ThenTheQuestionnaireIsAvailableToUse() { var instrumentHasInstalled = InstrumentHelper.GetInstance().SurveyHasInstalled(60); Assert.IsTrue(instrumentHasInstalled, "The instrument has not been installed, or is not active"); }
public void ThenTheInstrumentIsAvailableToUseInTheBlaiseEnvironment() { var instrumentHasInstalled = InstrumentHelper.GetInstance().SurveyHasInstalled(60); Assert.IsTrue(instrumentHasInstalled, "The instrument has not been installed, or is not active"); }
public static void CleanUpFeature() { InstrumentHelper.GetInstance().UninstallSurvey(); }
/// <summary>Executes the task.</summary> /// <param name="mainFileName">Name of the main file.</param> /// <param name="allLibZResources"> /// if set to <c>true</c> loads all LibZ files in resources on startup. /// </param> /// <param name="libzFiles">The LibZ files to be loaded on startup.</param> /// <param name="libzPatterns">The libz file patterns to be loaded on startup.</param> /// <param name="keyFileName">Name of the key file.</param> /// <param name="keyFilePassword">The key file password.</param> public virtual void Execute( string mainFileName, bool allLibZResources, string[] libzFiles, string[] libzPatterns, string keyFileName, string keyFilePassword) { if (!File.Exists(mainFileName)) { throw FileNotFound(mainFileName); } if (libzFiles == null) { libzFiles = new string[0]; } if (libzPatterns == null) { libzPatterns = new string[0]; } var targetAssembly = MsilUtilities.LoadAssembly(mainFileName); ValidateLibZInstrumentation(targetAssembly); var keyPair = MsilUtilities.LoadKeyPair(keyFileName, keyFilePassword); var requiresAsmZResolver = false; var bootstrapAssembly = FindBootstrapAssembly(targetAssembly, mainFileName); if (bootstrapAssembly == null) { var version = MsilUtilities.GetFrameworkVersion(targetAssembly); var bootstrapAssemblyImage = InstrumentHelper.GetBootstrapAssemblyImage(version); bootstrapAssembly = MsilUtilities.LoadAssembly(bootstrapAssemblyImage); if (bootstrapAssembly == null) { throw new ArgumentException("LibZ.Bootstrap has not been found"); } Log.Info("Using built in LibZResolver"); InjectDll( targetAssembly, bootstrapAssembly, bootstrapAssemblyImage, true); requiresAsmZResolver = true; } _instrumentHelper = new InstrumentHelper( targetAssembly, bootstrapAssembly); _instrumentHelper.InjectLibZInitializer(); if (requiresAsmZResolver) { _instrumentHelper.InjectAsmZResolver(); } _instrumentHelper.InjectLibZStartup(allLibZResources, libzFiles, libzPatterns); MsilUtilities.SaveAssembly(targetAssembly, mainFileName, keyPair); }