PranasLu's Blog

2009-07-11

Testas

Filed under: Programming — pranaslu @ 21:49

Kodo pvz.:

/// <summary>
/// Utility to manage data sessions and create session based database connections.
/// </summary>
public static class DatabaseSessionManager
{
//private static DatabaseSessionOwnerBase sessionOwner;
private const string cSchemaOwner = "Vibrip_OnLine_schema";
private const string cAuthSchemaOwner = "Vibrip_OnLine_schema";
private const string cSessionPackage = "USR_AUTH";
private const string cConnString = "BasicDBConn";
private const string cOnlineConnString = "OnlineDBConn";
//private static string UserName = "Unset";
//private static string Password = "Unset";
private static SessionStorage m_SessionStorage = null;
public static SessionStorage SessionStorage
{
set
{
m_SessionStorage = value;
m_SessionStorage.OpenConnection += ConnectionStorage_OpenConnection;
m_SessionStorage.ReleaseConnection += ConnectionStorage_ReleaseConnection;
}
get
{
if (m_SessionStorage == null) throw new NoNullAllowedException("SessionStorage is not set.");
return m_SessionStorage;
}
}
...
}

Be conteinerio:

 

/// <summary>
/// Utility to manage data sessions and create session based database connections.
/// </summary>
public static class DatabaseSessionManager
{
    //private static DatabaseSessionOwnerBase sessionOwner;
    private const string cSchemaOwner = "Vibrip_OnLine_schema";
    private const string cAuthSchemaOwner = "Vibrip_OnLine_schema";
    private const string cSessionPackage = "USR_AUTH";
    private const string cConnString = "BasicDBConn";
    private const string cOnlineConnString = "OnlineDBConn";
    //private static string UserName = "Unset";
    //private static string Password = "Unset";
    private static SessionStorage m_SessionStorage = null;
    public static SessionStorage SessionStorage
    {
        set
        {
            m_SessionStorage = value;
            m_SessionStorage.OpenConnection += ConnectionStorage_OpenConnection;
            m_SessionStorage.ReleaseConnection += ConnectionStorage_ReleaseConnection;
        }
        get
        {
            if (m_SessionStorage == null) throw new NoNullAllowedException("SessionStorage is not set.");
            return m_SessionStorage;
        }
    }
    ...
}
 
 
 

Paveiksliukas iš flickr:

2009-07-10_1630

Paveiksliukas:

image

Lietuviškos raidės:

ąčęėįšųūžĄČĘĖĮŠŲŪŽ

Failai parsisiuntimui:

Download file – DesignPatterns.rar

image

image

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: