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
[Fact] | |
public void EntityWithArrayCanBeFlattened() | |
{ | |
var root = new Parent | |
{ | |
Childrens = new[] { new Children { Name = "Łukasz" } } | |
}; | |
var flattened = TableEntity.Flatten(root, new OperationContext()); | |
} |
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 System; | |
using System.Net.Http; | |
using System.Threading.Tasks; | |
using System.Web.Mvc; | |
namespace TestMvc.Controllers | |
{ | |
public class HomeController : Controller | |
{ | |
public ActionResult Index() |
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 System; | |
using System.Collections; | |
using System.Collections.Generic; | |
namespace ProjectForTests | |
{ | |
public class PriorityQueue<T> : IEnumerable<T> where T : IComparable<T> | |
{ | |
private readonly LinkedList<T> _items = new LinkedList<T>(); |
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
public class SerializationUtils | |
{ | |
public const PrefixStyle Style = PrefixStyle.Fixed32; | |
public static int GetLengthOfPackage(byte[] buffer) | |
{ | |
int size; | |
Serializer.TryReadLengthPrefix(buffer, 0, buffer.Length, Style, out size); | |
return size; | |
} |
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
[ProtoContract] | |
[ProtoInclude(500, typeof(InsertRequest))] | |
public abstract class Request | |
{ | |
public virtual RequestType RequestType { get; set; } | |
} |
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
[ProtoContract] | |
public class InsertRequest : Request | |
{ | |
public override RequestType RequestType { get; set; } = RequestType.Insert; | |
[ProtoMember(1)] | |
public string Key { get; set; } | |
[ProtoMember(2)] | |
public byte[] Object { get; set; } |
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 ProtoBuf; | |
namespace Kronos.Core.StatusCodes | |
{ | |
[ProtoContract] | |
public enum RequestStatusCode : ushort | |
{ | |
[ProtoEnum] | |
Unknown = 0, |
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 ProtoBuf; | |
namespace Kronos.Core.Requests | |
{ | |
[ProtoContract] | |
public enum RequestType : ushort | |
{ | |
[ProtoEnum] | |
Unknown = 0, |
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
<configuration> | |
<runtime> | |
<gcServer enabled="true"/> | |
</runtime> | |
</configuration> |
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
[..] | |
namespace XGain | |
{ | |
public class XGainServer : IServer | |
{ | |
public event EventHandler<StartArgs> OnStart; | |
public event EventHandler<MessageArgs> OnNewMessage; | |
public event EventHandler<ErrorArgs> OnError; | |
private readonly Func<IProcessor<MessageArgs>> _requestProcessorResolver; |
NewerOlder