public static void PushConstants(Type constantsType = null) { if (constantsType == null) { constantsType = typeof(PluginConstants); } if (Constants != null) { PluginConstantsStack.Push(Constants); } Constants = (IPluginConstants)Activator.CreateInstance(constantsType); Debug.Assert(Constants != null); }
public static void PopConstants() { Constants = PluginConstantsStack.Count > 0 ? PluginConstantsStack.Pop() : null; }