Click here to Skip to main content
15,890,882 members
Home / Discussions / C#
   

C#

 
GeneralRe: please recommend a book for beginner Pin
OriginalGriff21-Jun-14 2:26
mveOriginalGriff21-Jun-14 2:26 
GeneralRe: please recommend a book for beginner Pin
solo921-Jun-14 11:29
solo921-Jun-14 11:29 
QuestionProblem with get() method! Pin
LAPEC20-Jun-14 7:07
LAPEC20-Jun-14 7:07 
AnswerRe: Problem with get() method! Pin
Eddy Vluggen20-Jun-14 7:59
professionalEddy Vluggen20-Jun-14 7:59 
GeneralRe: Problem with get() method! Pin
LAPEC20-Jun-14 8:14
LAPEC20-Jun-14 8:14 
GeneralRe: Problem with get() method! Pin
Eddy Vluggen20-Jun-14 8:36
professionalEddy Vluggen20-Jun-14 8:36 
GeneralRe: Problem with get() method! Pin
LAPEC20-Jun-14 8:43
LAPEC20-Jun-14 8:43 
GeneralRe: Problem with get() method! Pin
LAPEC20-Jun-14 8:46
LAPEC20-Jun-14 8:46 
In this part of code im having error on get() and set() method...

C#
<blockquote class="FQ"><div class="FQA">Quote:</div>protected static ISession getSession(string configFile, bool createNew) 
        {
		    if (createNew) 
            {
			    return getSessionFactory(configFile).OpenSession();
		    }
		    else 
            {
			    if (null == configFile) 
                {
				    if (null == sessions)
                    {
                        sessions = new ThreadLocal<ISession>();
                    }
				    ISession session = sessions.get();
				    if (null == session || !session.IsOpen) 
                    {
					    session = getSessionFactory(null).OpenSession();
					    session.set(session);
				    }
				    return session;
			    }
			    else 
                {
				    if (null == mappedSessions) 
                    {
                        mappedSessions = new ThreadLocal<IDictionary>();
                    }
                    Dictionary<string, ISession> map = mappedSessions.get();
				    if (null == map) 
                    {
                        map = new Dictionary<string, ISession>(1);
                        mappedSessions.set(map);
				    }
				    ISession session = map[configFile];
				    if (null == session || !session.IsOpen) 
                    {
					    session = getSessionFactory(configFile).OpenSession();
					    map.Add(configFile, session);
				    }
				    return session;
			    }
		    }
	    }</blockquote>

GeneralRe: Problem with get() method! Pin
Eddy Vluggen20-Jun-14 9:01
professionalEddy Vluggen20-Jun-14 9:01 
GeneralRe: Problem with get() method! Pin
LAPEC20-Jun-14 9:05
LAPEC20-Jun-14 9:05 
GeneralRe: Problem with get() method! Pin
Eddy Vluggen20-Jun-14 9:23
professionalEddy Vluggen20-Jun-14 9:23 
QuestionException Handling / Response Question Pin
Kevin Marois20-Jun-14 6:45
professionalKevin Marois20-Jun-14 6:45 
GeneralRe: Exception Handling / Response Question Pin
PIEBALDconsult20-Jun-14 7:37
mvePIEBALDconsult20-Jun-14 7:37 
GeneralRe: Exception Handling / Response Question Pin
Kevin Marois20-Jun-14 7:39
professionalKevin Marois20-Jun-14 7:39 
GeneralRe: Exception Handling / Response Question Pin
PIEBALDconsult20-Jun-14 7:44
mvePIEBALDconsult20-Jun-14 7:44 
GeneralRe: Exception Handling / Response Question Pin
Kevin Marois20-Jun-14 7:52
professionalKevin Marois20-Jun-14 7:52 
GeneralRe: Exception Handling / Response Question Pin
PIEBALDconsult20-Jun-14 8:05
mvePIEBALDconsult20-Jun-14 8:05 
AnswerRe: Exception Handling / Response Question Pin
Eddy Vluggen20-Jun-14 8:05
professionalEddy Vluggen20-Jun-14 8:05 
GeneralRe: Exception Handling / Response Question Pin
Kevin Marois20-Jun-14 8:18
professionalKevin Marois20-Jun-14 8:18 
GeneralRe: Exception Handling / Response Question Pin
Eddy Vluggen20-Jun-14 9:21
professionalEddy Vluggen20-Jun-14 9:21 
GeneralRe: Exception Handling / Response Question Pin
Kevin Marois20-Jun-14 10:22
professionalKevin Marois20-Jun-14 10:22 
GeneralRe: Exception Handling / Response Question Pin
Eddy Vluggen20-Jun-14 11:05
professionalEddy Vluggen20-Jun-14 11:05 
QuestionPass specific object to a method expecting ref object parameter? Pin
arnold_w20-Jun-14 3:24
arnold_w20-Jun-14 3:24 
AnswerRe: Pass specific object to a method expecting ref object parameter? Pin
Richard Deeming20-Jun-14 3:58
mveRichard Deeming20-Jun-14 3:58 
GeneralRe: Pass specific object to a method expecting ref object parameter? Pin
OriginalGriff20-Jun-14 3:59
mveOriginalGriff20-Jun-14 3:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.