Click here to Skip to main content
15,894,539 members
Articles / Web Development

Service Based Membership Providers for ASP.NET

Rate me:
Please Sign up or sign in to vote.
4.93/5 (45 votes)
4 May 2014CPOL29 min read 132.1K   8.2K   173  
Service based, multi-application ASP.NET custom membership, role and profile providers with a hierarchical role system.
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool from CryptoGateway Software Inc.
//     Tool name: CGW X-Script RDB visual Layer Generator
//
//     Archymeta Information Technologies Co., Ltd.
//
//     Changes to this file, could be overwritten if the code is re-generated.
//     Add (if not yet) a code-manager node to the generator to specify 
//     how existing files are processed.
// </auto-generated>
//------------------------------------------------------------------------------

using System;
using System.Configuration;
using System.Collections.Generic;
using System.Reflection;
using System.Linq;
using System.Linq.Expressions;
using System.Threading;
using System.Runtime.Serialization;

namespace CryptoGateway.RDB.Data.AspNetMember
{
    /// <summary>
    /// A class representing a token in structured query expression.
    /// </summary>
    [DataContract]
    public class QToken
    {
        /// <summary>
        /// The type of the token.
        /// </summary>
        [DataMember]
        public string TkType
        {
            get { return _tkType; }
            set { _tkType = value; }
        }
        private string _tkType = "";

        /// <summary>
        /// The name of the token in the query expression.
        /// </summary>
        [DataMember]
        public string TkName
        {
            get;
            set;
        }

        /// <summary>
        /// The display name of the token shown to the user.
        /// </summary>
        [DataMember]
        public string DisplayAs 
        {
            get;
            set;
        }

        /// <summary>
        /// For internal use only.
        /// </summary>
        [DataMember]
        public bool IsExternal
        {
            get { return _isExternal; }
            set { _isExternal = value; }
        }
        private bool _isExternal = false;

        /// <summary>
        /// For internal use only.
        /// </summary>
        [DataMember]
        public bool IsEntityAccess
        {
            get { return _isEntityAccess; }
            set { _isEntityAccess = value; }
        }
        private bool _isEntityAccess = false;
    }

    /// <summary>
    /// It represents list of possible tokens (see <see cref="QToken" />) that the can be added to the current query expression and the corresponding hints,
    /// if any.
    /// </summary>
    [DataContract]
    public class TokenOptions
    {
        /// <summary>
        /// When options a shown, it provides additional information to the client to make decision.
        /// </summary>
        [DataMember]
        public string Hint
        {
            get;
            set;
        }

        /// <summary>
        /// The current expression under which the options are relevent in a natural language form.
        /// </summary>
        [DataMember]
        public string CurrentExpr
        {
            get;
            set;
        }

        /// <summary>
        /// Internal use only.
        /// </summary>
        [DataMember]
        public bool QuoteVal
        {
            get { return _quoteVal; }
            set { _quoteVal = value; }
        }
        private bool _quoteVal = false;

        /// <summary>
        /// Internal use only.
        /// </summary>
        [DataMember]
        public bool CanBeClosed
        {
            get;
            set;
        }

        /// <summary>
        /// A list of options for clients to select under the current query expression.
        /// </summary>
        [DataMember]
        public List<QToken> Options
        {
            get;
            set;
        }
    }

    /// <summary>
    /// A class representing structured query expression.
    /// </summary>
    [DataContract]
    public class QueryExpresion
    {
        /// <summary>
        /// Internal use only.
        /// </summary>
        public string CacheKey
        {
            get 
            {
                string key = "";
                if (FilterTks != null)
                {
                    foreach (var tk in FilterTks)
                        key += tk.TkName + ":";
                }
                if (OrderTks != null)
                {
                    foreach (var tk in OrderTks)
                        key += tk.TkName + ":";
                }
                return key;
            }
        }

        /// <summary>
        /// A list of tokens representing client filtering request.
        /// </summary>
        [DataMember]
        public List<QToken> FilterTks
        {
            get;
            set;
        }

        /// <summary>
        /// A list of tokens representing client sorting request.
        /// </summary>
        [DataMember]
        public List<QToken> OrderTks
        {
            get;
            set;
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Founder CryptoGateway Software Inc.
Canada Canada


His interests in software research and development include security, domain specific meta-language development technologies and tools, meta-language driven code generation, generation of non-invasive and virtual SQL database for "un-structured" data (sqlization), automated relational data service production technologies, file system sqlization technologies and products, structured multi-lingual documentation tools and technologies, sqlization of user's personal data, like emails, etc..


He was a physicist before year 2000. He studied theoretical physics (the hidden symmetry between the past and future, quantum field theories, mirror universe, cosmological dark energies etc.) in which he think to had made fundamental breakthroughs[^] but the community is either not ready for it or is actively rejecting/ignoring it Smile | :) .



It struck me on Apr. 11, 2023 that the said theory above can even generate General Relativity naturally after a recent discussion in the Insider News group that triggers a rethinking of the subject on my side. The first stage of the work is completed in Sept. 2023, it is and will be continue to be published online

  • On Vacuum
  • Quantum and Gravity







    Most recent software system to share:



    • V-NET[^] - Full stack virtualization management system including networking, storage, virtual machines and containers, with an emphasis on networking ... to be released.

Comments and Discussions