Exemple #1
0
        /// <summary>
        /// Creates and instance of the member profile using the passed memberID and accepting the boolean to set anonymous on this instance.
        ///
        /// NOTE: All data is lazy loaded on first property access.
        /// </summary>
        /// <param name="memberId">Unique member ID to load</param>
        /// <param name="isAnonymous">true=anonymous; false=not anonymous</param>
        internal MemberProfile(Object memberId, Boolean isAnonymous)
        {
            String logMethodName = ".ctor(Object memberId, Boolean isAnonymous) - ";

            _log.Debug(logMethodName + "Begin Method");

            _isAnonymous = isAnonymous;

            _memberId = memberId;
            _provider = IntegrationLoader.CurrentContextDataProvider;

            _profileData          = new MemberProfileData();
            _profileData.MemberId = memberId;

            _orignalProfileData = _profileData;

            _newProfile = true;

            if (_isAnonymous)
            {
                _profileDataLoaded = true;
            }

            _log.Debug(logMethodName + "End Method");
        }
Exemple #2
0
        public SiteMembership()
        {
            String logMethodName = ".ctor()";

            _log.Info(logMethodName + " - Creating new static SiteMembership Instance");
            _log.Debug(logMethodName + " - Begin Constructor");

            try
            {
                _log.Debug(logMethodName + " - Retrieving IntegrationLoader.CurrentSecurityAdapter");
                _adapter = IntegrationLoader.CurrentSecurityAdapter;
            }
            catch (Exception ex)
            {
                String message = logMethodName + " - Unable to load security adapter, context init failure";
                _log.Fatal(message, ex);

                throw new WtfException(message, ex);
            }

            try
            {
                _log.Debug(logMethodName + " - Retrieving IntegrationLoader.CurrentContextDataProvider");
                _provider = IntegrationLoader.CurrentContextDataProvider;
            }
            catch (Exception ex)
            {
                String message = logMethodName + "Unable to load context data provider, context init failure";
                _log.Fatal(message, ex);

                throw new WtfException(message, ex);
            }

            _log.Debug(logMethodName + " - End Constructor");
        }
 public TenantSigningKeyResolver(
     ITenantProvider tenantProvider,
     IHttpContextAccessor httpContextAccessor,
     IContextDataProvider contextDataProvider)
 {
     _tenantProvider      = tenantProvider;
     _httpContextAccessor = httpContextAccessor;
     _contextDataProvider = contextDataProvider;
 }
Exemple #4
0
        public ContextData(string name, Object data, IContextDataProvider provider)
        {
            Name = name;
            Data = data;
            mContextDataProvider = provider;

            INotifyPropertyChanged notify = data as INotifyPropertyChanged;
            if(notify != null)
                notify.PropertyChanged += NotifyPropertyChanged;
        }
Exemple #5
0
        public GeometryData(string name, Object data, IContextDataProvider provider)
        {
            Name = name;
            Data = data;
            mContextDataProvider = provider;

            INotifyPropertyChanged notify = data as INotifyPropertyChanged;

            if (notify != null)
            {
                notify.PropertyChanged += NotifyPropertyChanged;
            }
        }
Exemple #6
0
        public IContextDataProvider GetDataProvider(string name)
        {
            if (string.Compare(name, mCoreDataProvider.Name, true) == 0)
            {
                return(mCoreDataProvider);
            }

            IContextDataProvider provider = null;

            if (DataProviders.TryGetValue(name, out provider))
            {
                return(provider);
            }

            return(null);
        }
Exemple #7
0
        private void Init()
        {
            String logMethodName = ".Init() - ";

            _log.Debug(logMethodName + "Begin Method");

            //We only need the context data provider as SiteMember is responsible for institutions.
            //MemberAccount handles all user-level security adapter fuctions.
            try
            {
                _log.Debug(logMethodName + "Retrieving IntegrationLoader.CurrentContextDataProvider");
                _provider = IntegrationLoader.CurrentContextDataProvider;
            }
            catch (Exception ex)
            {
                String message = logMethodName + "Unable to load context data provider, SiteMember init failed";

                _log.Fatal(message, ex);

                throw new WtfException(message, ex);
            }

            _log.Debug(logMethodName + "End Method");
        }
Exemple #8
0
 public TenantActionFilter(IContextDataProvider contextDataProvider)
 {
     _contextDataProvider = contextDataProvider;
 }
 public AuthorizationBehavior(IHttpContextAccessor contextAccessor, IContextDataProvider contextDataProvider)
 {
     _contextAccessor     = contextAccessor;
     _contextDataProvider = contextDataProvider;
 }