本文整理匯總了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();
}
}