public a_namespace_securable()
        {
            action_with_namespace_match     = new SomeType();
            action_within_another_namespace = new TotallyDifferentNamespace.TypeInDifferentNamespace();

            namespace_securable = new NamespaceSecurable(typeof(SomeType).Namespace);
        }
        public a_namespace_securable()
        {
            action_with_namespace_match     = new SimpleCommand();
            action_within_another_namespace = new CommandInADifferentNamespace();

            namespace_securable = new NamespaceSecurable(typeof(SimpleCommand).Namespace);
        }
        /// <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);
        }
Exemple #4
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);
        }