static public PerformanceDynModel Create(PropBagTypeSafetyMode safetyMode) { PerformanceDynModel pm = new PerformanceDynModel(safetyMode); pm.AddPropNoStore <int>("PropIntNoStore", null, false, null); pm.AddPropNoStore <string>("PropStringNoStore", null, false, null); return(pm); }
public void SetInt1000WithNoStoreDyn() { mod1Dyn = PerformanceDynModel.Create(PropBagTypeSafetyMode.AllPropsMustBeRegistered); mod1 = mod1Dyn as PerformanceDynModel; mod1.PropertyChanged += Mod1_PropertyChangedNoStore; mod1.PropertyChanged2 += Mod1_PropertyChanged2; for (int cntr = 0; cntr < InterationCount - 1; cntr++) { mod1.PropIntNoStore = cntr; } }
public void SetInt1000NoTypeDyn() { mod1Dyn = PerformanceDynModel.Create(PropBagTypeSafetyMode.None); mod1 = mod1Dyn as PerformanceDynModel; mod1.PropertyChanged += Mod1_PropertyChanged; mod1.PropertyChanged2 += Mod1_PropertyChanged2; for (int cntr = 0; cntr < InterationCount - 1; cntr++) { mod1[typeof(Int32), "PropInt"] = cntr; } }
public void SetString1000IndexDyn() { mod1Dyn = PerformanceDynModel.Create(PropBagTypeSafetyMode.None); mod1 = mod1Dyn as PerformanceDynModel; mod1.PropertyChanged += Mod1_PropertyChanged; mod1.PropertyChanged2 += Mod1_PropertyChanged2; string val; for (int cntr = 0; cntr < InterationCount - 1; cntr++) { val = cntr.ToString(); mod1["PropString"] = val; } }
public void SetString1000WithDynProp() { mod1Dyn = PerformanceDynModel.Create(PropBagTypeSafetyMode.AllPropsMustBeRegistered); mod1 = mod1Dyn as PerformanceDynModel; mod1.PropertyChanged += Mod1_PropertyChanged; mod1.PropertyChanged2 += Mod1_PropertyChanged2; string val; for (int cntr = 0; cntr < InterationCount - 1; cntr++) { val = cntr.ToString(); mod1Dyn.PropString = val; } }
public void Destroy() { mod1.ClearEventSubscribers(); mod1 = null; }