Exemplo n.º 1
0
        /// <summary>
        /// Add a <see cref="FetchingSecurityTarget"/> to the <see cref="Fetching">action</see>.
        /// </summary>
        /// <param name="action"><see cref="Fetching">Action</see> to add to.</param>
        /// <returns><see cref="FetchingSecurityTarget"/>.</returns>
        public static FetchingSecurityTarget ReadModels(this Fetching action)
        {
            var target = new FetchingSecurityTarget();

            action.AddTarget(target);
            return(target);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Add a <see cref="NamespaceSecurable"/> to the <see cref="FetchingSecurityTarget"/> for a given namespace.
        /// </summary>
        /// <param name="target"><see cref="FetchingSecurityTarget"/> 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);
        }