This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div style="width: 300px; border: 1px solid blue"> | |
<div style="position: absolute; | |
background-color: powderblue;">hello</div> | |
</div> | |
<div style="position: relative;"> </div> | |
<div style="width: 300px; border: 1px solid red"> | |
<div style="position: absolute; | |
background-color: lightgoldenrodyellow">hello there</div> | |
</div> | |
<div style="position: relative;"> </div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div style="width: 300px; background-color: azure; border: 1px solid blue"> | |
<div style="padding: 20px; background-color: lightgoldenrodyellow">This box has a padding of 20 pixels. Now is the time for all good men to come to the aid of their country. The quick fox jumped over the road.</div> | |
<div></div> | |
<div style="padding: 20px; width: 100%; background-color: lightcoral">This box has a padding of 20 pixels and a width of 100%. Now is the time for all good men to come to the aid of their country. The quick fox jumped over the road.</div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<caching> | |
<outputCache defaultProvider="MyRedisOutputCache"> | |
<providers> | |
<add name="MyRedisOutputCache" | |
host = "127.0.0.1" [String] | |
port = "" [number] | |
accessKey = "" [String] | |
ssl = "false" [true|false] | |
databaseId = "0" [number] | |
applicationName = "" [String] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<sessionState mode="Custom" customProvider="MySessionStateStore"> | |
<providers> | |
<add name="MySessionStateStore" | |
host = "127.0.0.1" [String] | |
port = "" [number] | |
accessKey = "" [String] | |
ssl = "false" [true|false] | |
throwOnError = "true" [true|false] | |
retryTimeoutInMilliseconds = "0" [number] | |
databaseId = "0" [number] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cache.StringSet("key1", "value1", TimeSpan.FromMinutes(90)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IDatabase cache = Connection.GetDatabase(); | |
// Perform cache operations using the cache object... | |
// Simple put of integral data types into the cache | |
cache.StringSet("key1", "value"); | |
cache.StringSet("key2", 25); | |
// Simple get of data types from the cache | |
string key1 = cache.StringGet("key1"); | |
int key2 = (int)cache.StringGet("key2"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ConnectionMultiplexer connection = ConnectionMultiplexer.Connect("contoso5.redis.cache.windows.net,ssl=true,password=..."); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using StackExchange.Redis; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static void InitializeContainer(Container container) | |
{ | |
// Register ConsoleLogger as a singleton | |
container.RegisterSingle<ILogger, ConsoleLogger>(); | |
// container.Register<ILogger, ConsoleLogger>(Lifestyle.Singleton); | |
container.Register<ICounter, Counter>(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Interfaces; | |
using System; | |
namespace Common | |
{ | |
public class ConsoleLogger : ILogger | |
{ | |
public void LogMessage(string message) | |
{ | |
Console.WriteLine(message); |