iQuantile.DotLib.SessionManager 1.0.0

Session Class for Windows Forms/ WPF

Install-Package iQuantile.DotLib.SessionManager -Version 1.0.0
dotnet add package iQuantile.DotLib.SessionManager --version 1.0.0
<PackageReference Include="iQuantile.DotLib.SessionManager" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add iQuantile.DotLib.SessionManager --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Sharp Session

Just in case someone needs session for Windows forms/WPF

Installation

It is recommended to use NuGet. F.ex through the VS Package Manager Console Install-Package iQuantile.DotLib.SessionManager -Version 1.0.0r or using the VS "Manage NuGet Packages..." extension.

How to use

Session is a static class. add reference.

using static SessionManager.SharpSession;
Start Session
SessionStart();
Session["A"] = 5;
int y = (int)Session["A"];

Special Methods

GET<T>

In stead of type casting use GET<T>("key"). this will work like (T)Session["key"]

Session["A"] = 5;

int x = Get<int>("A");

SET

In stead of type casting use SET("Key",value).this will store the data on Session[key]

Set("A", 10);
int y =  (int)Session["A"];

OTHER SESSION METHODS


SessionDestroy(); //destroys the session
SessionUnset();  //re initialize session
SessionReset(); //Sets all keys to null
            

RegenerateId();      // Creates new ID and appends to sessionID
int x = CreateId(); //Returns a new SessionID

OTHER PROPERTIES

public static int SessionId { get; set; } //Holds the session ID
public static string SessionName { get; set; } //Holds the session name

Sharp Session

Just in case someone needs session for Windows forms/WPF

Installation

It is recommended to use NuGet. F.ex through the VS Package Manager Console Install-Package iQuantile.DotLib.SessionManager -Version 1.0.0r or using the VS "Manage NuGet Packages..." extension.

How to use

Session is a static class. add reference.

using static SessionManager.SharpSession;
Start Session
SessionStart();
Session["A"] = 5;
int y = (int)Session["A"];

Special Methods

GET<T>

In stead of type casting use GET<T>("key"). this will work like (T)Session["key"]

Session["A"] = 5;

int x = Get<int>("A");

SET

In stead of type casting use SET("Key",value).this will store the data on Session[key]

Set("A", 10);
int y =  (int)Session["A"];

OTHER SESSION METHODS


SessionDestroy(); //destroys the session
SessionUnset();  //re initialize session
SessionReset(); //Sets all keys to null
            

RegenerateId();      // Creates new ID and appends to sessionID
int x = CreateId(); //Returns a new SessionID

OTHER PROPERTIES

public static int SessionId { get; set; } //Holds the session ID
public static string SessionName { get; set; } //Holds the session name

Release Notes

initial release

  • .NETFramework 4.0

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.0 254 3/29/2018