本文整理汇总了C#中Potato.Core.Security.SecurityController.Execute方法的典型用法代码示例。如果您正苦于以下问题:C# SecurityController.Execute方法的具体用法?C# SecurityController.Execute怎么用?C# SecurityController.Execute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Potato.Core.Security.SecurityController
的用法示例。
在下文中一共展示了SecurityController.Execute方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Setup
/// <summary>
/// Sets up the static controllers in this class to all use one-another for their internal
/// references to the objects. This method is used so once all the static controllers have been setup
/// we can update all of their references in one hit, ensuring they all communicate with each other.
///
/// This makes the default controllers coupled with one another, but not a particular reference of the
/// object (useful for unit testing!). The alternative is to not have the static objects at all, but the
/// code does get very messy on some of the controllers that go a few levels deep (Potato.Core.Security or ..Plugins)
/// </summary>
public static void Setup() {
SharedReferences._masterVariables = new VariableController();
SharedReferences._masterLanguages = new LanguageController();
SharedReferences._masterSecurity = new SecurityController();
SharedReferences._masterEvents = new EventsController();
if (SharedReferences._masterVariables != null && SharedReferences._masterLanguages != null && SharedReferences._masterSecurity != null && SharedReferences._masterEvents != null) {
SharedReferences._masterVariables.Shared.Variables = SharedReferences._masterLanguages.Shared.Variables = SharedReferences._masterSecurity.Shared.Variables = SharedReferences._masterEvents.Shared.Variables = SharedReferences._masterVariables;
SharedReferences._masterVariables.Shared.Languages = SharedReferences._masterLanguages.Shared.Languages = SharedReferences._masterSecurity.Shared.Languages = SharedReferences._masterEvents.Shared.Languages = SharedReferences._masterLanguages;
SharedReferences._masterVariables.Shared.Security = SharedReferences._masterLanguages.Shared.Security = SharedReferences._masterSecurity.Shared.Security = SharedReferences._masterEvents.Shared.Security = SharedReferences._masterSecurity;
SharedReferences._masterVariables.Shared.Events = SharedReferences._masterLanguages.Shared.Events = SharedReferences._masterSecurity.Shared.Events = SharedReferences._masterEvents.Shared.Events = SharedReferences._masterEvents;
_masterVariables.Execute();
_masterLanguages.Execute();
_masterSecurity.Execute();
_masterEvents.Execute();
}
}