CSLA.NET 5.4.2
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
IContextManager.cs
Go to the documentation of this file.
1//-----------------------------------------------------------------------
2// <copyright file="IContextManager.cs" company="Marimer LLC">
3// Copyright (c) Marimer LLC. All rights reserved.
4// Website: https://cslanet.com
5// </copyright>
6// <summary>Defines the interface for an application </summary>
7//-----------------------------------------------------------------------
8using System;
9using System.Security.Principal;
10
11namespace Csla.Core
12{
17 public interface IContextManager
18 {
24 bool IsValid { get; }
28 IPrincipal GetUser();
33 void SetUser(IPrincipal principal);
64 IServiceProvider GetDefaultServiceProvider();
69 void SetDefaultServiceProvider(IServiceProvider serviceProvider);
73#pragma warning disable CS3002 // Return type is not CLS-compliant
74 IServiceProvider GetServiceProvider();
75#pragma warning restore CS3002 // Return type is not CLS-compliant
80#pragma warning disable CS3001 // Argument type is not CLS-compliant
81 void SetServiceProvider(IServiceProvider scope);
82#pragma warning restore CS3001 // Argument type is not CLS-compliant
83 }
84}
Dictionary type that is serializable with the SerializationFormatterFactory.GetFormatter().
Defines the interface for an application context manager type.
void SetClientContext(ContextDictionary clientContext)
Sets the client context.
bool IsValid
Gets a value indicating whether this context manager is valid for use in the current environment.
IPrincipal GetUser()
Gets the current principal.
void SetGlobalContext(ContextDictionary globalContext)
Sets the global context.
ContextDictionary GetClientContext()
Gets the client context.
void SetDefaultServiceProvider(IServiceProvider serviceProvider)
Sets the default IServiceProvider
ContextDictionary GetGlobalContext()
Gets the global context.
IServiceProvider GetDefaultServiceProvider()
Gets the default IServiceProvider
void SetUser(IPrincipal principal)
Sets the current principal.
void SetLocalContext(ContextDictionary localContext)
Sets the local context.
IServiceProvider GetServiceProvider()
Gets the service provider scope for current scope.
void SetServiceProvider(IServiceProvider scope)
Sets the service provider for current scope.
ContextDictionary GetLocalContext()
Gets the local context.