Click here to Skip to main content
15,881,423 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 131.4K   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
{
    public interface IJointSet
    {
        string NextJoin(string thismember, string psetid);
    }

    public class SetRefTree
    {
        public SetRefInfo CurrentRef
        {
            get;
            set;
        }

        public bool UniqueRequired
        {
            get;
            set;
        }

        public List<SetRefInfo> RefRoots
        {
            get 
            {
                if (_refRoots == null)
                    _refRoots = new List<SetRefInfo>();
                return _refRoots;
            }
        }
        private List<SetRefInfo> _refRoots = null;

        public bool IsNonEmpty()
        {
            return RefRoots.Count > 0;
        }
    }

    public class SetRefInfo
    {
        public string JointSetPath_
        {
            get;
            set;
        }

        public string JointSetName_
        {
            get;
            set;
        }

        public string[] JointKeys_
        {
            get;
            set;
        }

        public string CurrSetPath_
        {
            get;
            set;
        }

        public string CurrSetName_
        {
            get;
            set;
        }

        public string[] CurrKeys_
        {
            get;
            set;
        }

        public string MemberRef
        {
            get;
            set;
        }

        public Dictionary<string, string> MemberAttribs
        {
            get;
            set;
        }

        public IJointSet SetRef
        {
            get;
            set;
        }

        public SetRefInfo ParentRef
        {
            get { return _parentRef == null ? null : _parentRef.Target as SetRefInfo; }
            set { _parentRef = value == null ? null : new WeakReference(value); } 
        }
        private WeakReference _parentRef = null;

        public List<SetRefInfo> ChildRefs
        {
            get 
            {
                if (_childRefs == null)
                    _childRefs = new List<SetRefInfo>();
                return _childRefs;
            }
        }
        private List<SetRefInfo> _childRefs = null;

        public string GetRefPath(string sep = "_")
        {
            SetRefInfo i = this;
            string path = "";
            while (i != null)
            {
                if (i == this)
                    path = i.MemberRef;
                else
                    path = i.MemberRef + sep + path;
                i = i.ParentRef;
            }
            return path;
        }
    }
}

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