public static void InitClassTypesDictionary() { if (bDone) { return; } bDone = true; // TODO: remove after we don't need old serializer to load old repo items NewRepositorySerializer.NewRepositorySerializerEvent += RepositorySerializer.NewRepositorySerializer_NewRepositorySerializerEvent; // Add all RI classes from GingerCore NewRepositorySerializer.AddClassesFromAssembly(typeof(GingerCore.Actions.ActButton).Assembly); // GingerCore.dll // add from Ginger NewRepositorySerializer.AddClassesFromAssembly(typeof(Ginger.App).Assembly); // Each class which moved from GingerCore to GingerCoreCommon needed to be added here, so it will auto translate // For backward compatibility of loading old object name in xml Dictionary <string, Type> list = new Dictionary <string, Type>(); list.Add("GingerCore.Actions.ActInputValue", typeof(ActInputValue)); list.Add("GingerCore.Actions.ActReturnValue", typeof(ActReturnValue)); list.Add("GingerCore.Actions.EnhancedActInputValue", typeof(EnhancedActInputValue)); list.Add("GingerCore.Environments.GeneralParam", typeof(GeneralParam)); // Put back for Lazy load of BF.Acitvities NewRepositorySerializer.AddLazyLoadAttr(nameof(BusinessFlow.Activities)); // TODO: add RI type, and use attr on field NewRepositorySerializer.AddLazyLoadAttr(nameof(ApplicationPOMModel.UnMappedUIElements)); NewRepositorySerializer.AddLazyLoadAttr(nameof(ApplicationPOMModel.MappedUIElements)); NewRepositorySerializer.AddClasses(list); }
public static void InitClassTypesDictionary() { //TODO: cleanup after all RIs moved to GingerCoreCommon //if (bDone) return; //bDone = true; // TODO: remove after we don't need old serializer to load old repo items // NewRepositorySerializer.NewRepositorySerializerEvent += RepositorySerializer.NewRepositorySerializer_NewRepositorySerializerEvent; // Add all RI classes from GingerCoreCommon NewRepositorySerializer.AddClassesFromAssembly(typeof(RepositoryItemBase).Assembly); // Add all RI classes from GingerCore // NewRepositorySerializer.AddClassesFromAssembly(typeof(GingerCore.Actions.ActButton).Assembly); // GingerCore.dll // add old Plugins - TODO: remove later when we change to new plugins // NewRepositorySerializer.AddClassesFromAssembly(typeof(GingerPlugIns.ActionsLib.PlugInActionsBase).Assembly); // add from Ginger - items like RunSetConfig // NewRepositorySerializer.AddClassesFromAssembly(typeof(Ginger.App).Assembly); // Each class which moved from GingerCore to GingerCoreCommon needed to be added here, so it will auto translate // For backward compatibility of loading old object name in xml Dictionary <string, Type> list = new Dictionary <string, Type>(); list.Add("GingerCore.Actions.ActInputValue", typeof(ActInputValue)); list.Add("GingerCore.Actions.ActReturnValue", typeof(ActReturnValue)); list.Add("GingerCore.Actions.EnhancedActInputValue", typeof(EnhancedActInputValue)); list.Add("GingerCore.Environments.GeneralParam", typeof(GeneralParam)); // Put back for Lazy load of BF.Acitvities NewRepositorySerializer.AddLazyLoadAttr(nameof(BusinessFlow.Activities)); // TODO: add RI type, and use attr on field // Verify the old name used in XML //list.Add("GingerCore.Actions.RepositoryItemTag", typeof(RepositoryItemTag)); //list.Add("GingerCore.Actions.EnhancedActInputValue", typeof(EnhancedActInputValue)); // TODO: change to SR2 if we want the files to be loaded convert and save with the new SR2 //if (WorkSpace.Instance.BetaFeatures.UseNewRepositorySerializer) //{ //RepositorySerializer2 RS2 = new RepositorySerializer2(); //SolutionRepository.mRepositorySerializer = RS2; //RepositoryFolderBase.mRepositorySerializer = RS2; // ObservableListSerializer.RepositorySerializer = RS2; //} //else //{ // SolutionRepository.mRepositorySerializer = new RepositorySerializer(); // RepositoryFolderBase.mRepositorySerializer = new RepositorySerializer(); //} NewRepositorySerializer.AddClasses(list); }
private static void AddLazyLoad() { // TODO: add RI type, and use attr on field NewRepositorySerializer.AddLazyLoadAttr(nameof(BusinessFlow.Activities)); NewRepositorySerializer.AddLazyLoadAttr(nameof(Activity.Acts)); NewRepositorySerializer.AddLazyLoadAttr(nameof(ApplicationPOMModel.UnMappedUIElements)); NewRepositorySerializer.AddLazyLoadAttr(nameof(ApplicationPOMModel.MappedUIElements)); }
private static void AddLazyLoad() { // TODO: add RI type, and use attr on field NewRepositorySerializer.AddLazyLoadAttr(nameof(BusinessFlow.Activities)); //TODO: see impact of acts - remember to add also handle in attr see others //NewRepositorySerializer.AddLazyLoadAttr(nameof(Activity.Acts)); NewRepositorySerializer.AddLazyLoadAttr(nameof(ApplicationPOMModel.UnMappedUIElements)); NewRepositorySerializer.AddLazyLoadAttr(nameof(ApplicationPOMModel.MappedUIElements)); }
public static void InitClassTypesDictionary() { //TODO: cleanup after all RIs moved to GingerCoreCommon if (bDone) { return; } bDone = true; // TODO: remove after we don't need old serializer to load old repo items NewRepositorySerializer.NewRepositorySerializerEvent += RepositorySerializer.NewRepositorySerializer_NewRepositorySerializerEvent; // Add all RI classes from GingerCoreNET // NewRepositorySerializer.AddClassesFromAssembly(typeof(RunSetConfig).Assembly); // Add all RI classes from GingerCoreCommon NewRepositorySerializer.AddClassesFromAssembly(typeof(RepositoryItemBase).Assembly); // Add all RI classes from GingerCore NewRepositorySerializer.AddClassesFromAssembly(typeof(GingerCore.Actions.ActButton).Assembly); // GingerCore.dll // add from Ginger NewRepositorySerializer.AddClassesFromAssembly(typeof(Ginger.App).Assembly); // Each class which moved from GingerCore to GingerCoreCommon needed to be added here, so it will auto translate // For backward compatibility of loading old object name in xml Dictionary <string, Type> list = new Dictionary <string, Type>(); list.Add("GingerCore.Actions.ActInputValue", typeof(ActInputValue)); list.Add("GingerCore.Actions.ActReturnValue", typeof(ActReturnValue)); list.Add("GingerCore.Actions.EnhancedActInputValue", typeof(EnhancedActInputValue)); list.Add("GingerCore.Environments.GeneralParam", typeof(GeneralParam)); // TODO: remove after it moved to common AddClass(list, typeof(RunSetConfig)); AddClass(list, typeof(RunSetActionSendEmail)); AddClass(list, typeof(BusinessFlowReport)); AddClass(list, typeof(HTMLReportConfiguration)); AddClass(list, typeof(HTMLReportConfigFieldToSelect)); AddClass(list, typeof(Agent)); AddClass(list, typeof(DriverConfigParam)); AddClass(list, typeof(GingerRunner)); AddClass(list, typeof(ApplicationAgent)); AddClass(list, typeof(RunSetActionHTMLReportSendEmail)); AddClass(list, typeof(EmailHtmlReportAttachment)); AddClass(list, typeof(RunSetActionAutomatedALMDefects)); AddClass(list, typeof(RunSetActionGenerateTestNGReport)); AddClass(list, typeof(RunSetActionHTMLReport)); AddClass(list, typeof(RunSetActionSaveResults)); AddClass(list, typeof(RunSetActionSendFreeEmail)); AddClass(list, typeof(RunSetActionSendSMS)); AddClass(list, typeof(RunSetActionPublishToQC)); AddClass(list, typeof(ActSetVariableValue)); AddClass(list, typeof(ActClearAllVariables)); AddClass(list, typeof(ActAgentManipulation)); AddClass(list, typeof(ActUIElement)); AddClass(list, typeof(UserProfile)); AddClass(list, typeof(Solution)); AddClass(list, typeof(Email)); AddClass(list, typeof(EmailAttachment)); AddClass(list, typeof(RunSetActionScript)); // Put back for Lazy load of BF.Acitvities NewRepositorySerializer.AddLazyLoadAttr(nameof(BusinessFlow.Activities)); // TODO: add RI type, and use attr on field // Verify the old name used in XML //list.Add("GingerCore.Actions.RepositoryItemTag", typeof(RepositoryItemTag)); //list.Add("GingerCore.Actions.EnhancedActInputValue", typeof(EnhancedActInputValue)); // TODO: change to SR2 if we want the files to be loaded convert and save with the new SR2 //if (WorkSpace.Instance.BetaFeatures.UseNewRepositorySerializer) //{ //RepositorySerializer2 RS2 = new RepositorySerializer2(); //SolutionRepository.mRepositorySerializer = RS2; //RepositoryFolderBase.mRepositorySerializer = RS2; // ObservableListSerializer.RepositorySerializer = RS2; //} //else //{ // SolutionRepository.mRepositorySerializer = new RepositorySerializer(); // RepositoryFolderBase.mRepositorySerializer = new RepositorySerializer(); //} NewRepositorySerializer.AddClasses(list); }