Table of Contents

Method GetTokenFor

Namespace
FS.Hosting.Shared
Assembly
FS.Hosting.Shared.dll

GetTokenFor<T>(IFSCache)

Gibt für den übergebenen Type einen IChangeToken zurück.

public static IChangeToken GetTokenFor<T>(this IFSCache cache)

Parameters

cache IFSCache

Returns

IChangeToken

Type Parameters

T

Remarks

Bei der Arbeit mit Components sollte immer das Component-Interface für den einzelnen Record übergeben werden.

Beispiel:

return FSCache.Instance.Static().GetOrCreate("Countries", entry =>
    {
        entry.AddExpirationToken(FSCache.Instance.GetTokenFor<IcdCountry>() );
        var countries = cdCountryCollFactory.Create();
        countries.Load();
        return countries;
    });
See Also