public void RenameField_InvokedOnFile1_UpdatesFile2ButNotFile1() { _updater.RenameField(_audioFile1, "died", "PassedOn"); _audioFile1.Load(); Assert.IsNotNull(_audioFile1.MetaDataFieldValues.Find(x => x.FieldId == "custom_died")); Assert.IsNull(_audioFile1.MetaDataFieldValues.Find(x => x.FieldId == "PassedOn")); Assert.IsNull(_audioFile1.MetaDataFieldValues.Find(x => x.FieldId == "custom_PassedOn")); }
public void RenameField_InvokeForAudioFiles_DoesNotUpdateOtherFileTypes() { _updater.RenameField(_audioFile1, "born", "Channels"); _imgFile1.Load(); Assert.IsNotNull(_imgFile1.MetaDataFieldValues.Find(x => x.FieldId == "custom_born")); Assert.IsNull(_imgFile1.MetaDataFieldValues.Find(x => x.FieldId == "Channels")); _imgFile2.Load(); Assert.IsNotNull(_imgFile2.MetaDataFieldValues.Find(x => x.FieldId == "custom_born")); Assert.IsNull(_imgFile2.MetaDataFieldValues.Find(x => x.FieldId == "Channels")); }
public void RenameField_Invoked_DoesUpdates() { _updater.RenameField(_audioFile1, "born", "Channels"); // See RenameField_InvokedOnFile1_UpdatesFile2ButNotFile1 for why _file2 isn't checked. Assert.IsNull(_audioFile2.MetaDataFieldValues.Find(x => x.FieldId == "Channels")); _audioFile2.Load(); Assert.IsNull(_audioFile2.MetaDataFieldValues.Find(x => x.FieldId == "born")); Assert.IsNull(_audioFile2.MetaDataFieldValues.Find(x => x.FieldId == "custom_born")); Assert.IsNotNull(_audioFile2.MetaDataFieldValues.Find(x => x.FieldId == "Channels")); }
static void Test01() { var filename = "ddc_sdk.dill"; filename = "test_scripts/hello.dill"; var bytes = System.IO.File.ReadAllBytes(filename); Console.WriteLine(bytes.Length); // foreach (var b in bytes.Take(16)) Console.WriteLine(b.ToString("X2")); var componentFile = ComponentFile.Load(filename); Console.WriteLine(new DartStringBuilder().Serialize(componentFile).ToString()); Console.WriteLine(); int x = 3; }
/// ------------------------------------------------------------------------------------ public void SetComponentFile(ComponentFile file) { _file = file; _file.Load(); RowData = new List <FieldInstance>(); LoadFields(); file.PostGenerateOralAnnotationFileAction += generated => { if (generated) { RowData = new List <FieldInstance>(); LoadFields(); } }; if (ComponentFileChanged != null) { ComponentFileChanged(); } }
public static ComponentFile Load(string file) { var target = $"{preamble}scripts/{file}.dill"; return(ComponentFile.Load(target)); }