Skip to content
This repository was archived by the owner on Nov 20, 2018. It is now read-only.

Conversation

hishamco
Copy link
Contributor

Provide a generic version of ISessionCollection.Set<T> and ISessionCollection.Get<T> which allow the developers to implement ISessionFormatter. Based on David Fowler suggestion we can plug BondSessionFormatter or ProtoBufSessionFormatter as well.
/cc @Tratcher

@ghost
Copy link

ghost commented Apr 18, 2015

Hi @hishamco, I'm your friendly neighborhood Microsoft Open Technologies, Inc. Pull Request Bot (You can call me MSOTBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!

The agreement was validated by Microsoft Open Technologies, Inc. and real humans are currently evaluating your PR.

TTYL, MSOTBOT;

@dnfclas
Copy link

dnfclas commented May 5, 2015

Hi @hishamco, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes. I promise there's no faxing. https://cla2.dotnetfoundation.org.

TTYL, DNFBOT;

@dnfclas
Copy link

dnfclas commented May 5, 2015

@hishamco, Thanks for signing the contribution license agreement so quickly! Actual humans will now validate the agreement and then evaluate the PR.

Thanks, DNFBOT;

public static void Set<T>(this ISessionCollection session, string key, T value, ISessionFormatter<T> formatter)
{
session.Set(key, formatter.Serialize(value));
}
}
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When committing from Windows to GitHub or git in general: always a line-break at the end of each file, so the diff does not show this:
github: no newline before the end of line

Read more on No newline before the end of file - Stackoverflow.
Note: it will not actually add that extra line in source-control (but just squash out the last \r)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jasonwilliams200OK I added two methods without adding or modifying line-break

@davidfowl
Copy link
Member

Currently we're not comfortable making this part of the built in interface (even though they are extension methods). The current recommendation is to put something like this into your application code and use whatever serializer/deserialize best fits your needs. We might revisit this in the future.

@davidfowl davidfowl closed this Aug 15, 2015
@hishamco
Copy link
Contributor Author

Thanks @davidfowl

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants