Пример #1
0
 /// <summary>
 /// Add a <see cref="NamespaceSecurable"/> to the <see cref="FetchingSecurityTarget"/> for a given namespace
 /// </summary>
 /// <param name="target"><see cref="CommandSecurityTarget"/> to add to</param>
 /// <param name="namespace">Namespace to secure</param>
 /// <param name="continueWith">Callback for continuing the fluent interface</param>
 /// <returns><see cref="NamespaceSecurable"/> for the specific namespace</returns>
 public static FetchingSecurityTarget InNamespace(this FetchingSecurityTarget target, string @namespace, Action<NamespaceSecurable> continueWith)
 {
     var securable = new NamespaceSecurable(@namespace);
     target.AddSecurable(securable);
     continueWith(securable);
     return target;
 }
Пример #2
0
        public a_namespace_securable()
        {
            action_with_exact_namespace_match = new CommandScenario<SimpleCommand>();
            action_with_partial_namespace_match = new SimpleCommand();
            action_within_another_namespace = new CommandInADifferentNamespace();

            namespace_securable = new NamespaceSecurable(typeof(CommandScenario<>).Namespace);
        }