Skip to content

Instantly share code, notes, and snippets.

View starteleport's full-sized avatar

Nikolay Baraboshkin starteleport

View GitHub Profile
@starteleport
starteleport / Fusion.log
Created March 2, 2016 10:25
Binding LibSassHost.Native-32
*** Запись журнала привязки сборки (02.03.2016 @ 14:57:27) ***
Операция выполнена со сбоем.
Результат привязки: hr = 0x8007000b. Была сделана попытка загрузить программу, имеющую неверный формат.
Диспетчер сборки загружен с: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Выполняется в контексте исполняемого файла c:\windows\system32\inetsrv\w3wp.exe
--- Подробный журнал ошибок.
=== Информация о состоянии предварительной привязки ===
<log4net>
<appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="Log\MyLog_" />
<appendToFile value="true" />
<rollingStyle value="Date" />
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
<datePattern value="yyyyMMdd.lo\g" />
<maxSizeRollBackups value="6" />
<staticLogFileName value="false" />
<layout type="log4net.Layout.PatternLayout">
@starteleport
starteleport / UrlExtensionsTest.cs
Created March 6, 2013 10:03
Ambiguous UrlExtensions.ToUrl method behaviour
[Route("/route/{Id}")]
public class JustId : IReturn
{
public long Id { get; set; }
}
[Route("route/{Id}")]
public class JustId_NoSlash : IReturn
{
public long Id { get; set; }
@starteleport
starteleport / MapValueTests.cs
Created February 11, 2013 11:58
MapValue works incorrectly with mapping extensions
#region Types for MapValueTest
public class Person
{
public int Id { get; set; }
public bool IsActive { get; set; }
}
public class SecurityDbMappingSchema : MappingSchema
{
@starteleport
starteleport / SecurityMap.xml
Created February 11, 2013 11:54
Person class mapping
<?xml version="1.0" encoding="utf-8" ?>
<Types
xmlns = "urn:schemas-bltoolkit-net:typeext"
xmlns:m = "urn:schemas-bltoolkit-net:mapping"
xmlns:da = "urn:schemas-bltoolkit-net:dataaccess">
<Type Name="Person" da:TableName="Persons">
<Member Name="Id" m:MapField="UserId" da:PrimaryKey="1" da:Identity="1" />
<Member Name="MiddleName" m:MapField="MI" />
@starteleport
starteleport / ForGitHub.cs
Created February 1, 2013 08:42
VerificationException "Operation could destabilize the runtime." when mapping. Passing and failing tests
#region Types for VerificationFailedExceptionTest
public class Class1
{
public string Token { get; set; }
}
public class Class2
{
private readonly string _token;
@starteleport
starteleport / BltMapTests.cs
Created January 31, 2013 15:21
Unable to map RecoveryTicket to RecoveryRecord, and backwards
[TestClass]
public class ForGitHub
{
#region Types
public class RecoveryRecord
{
public string Token { get; set; }
}
@starteleport
starteleport / ConvertT.cs
Last active December 11, 2015 10:18
Part of Convert<T, P> class
private static P SameType (P p) { return p; }
private static T Assignable(P p) { return (T)(object)p; }
private static T Default(P p) { return (p as IConvertible) == null ? (T)(object)p : (T)System.Convert.ChangeType(p, typeof(T), Thread.CurrentThread.CurrentCulture); }
#region Types
public class TestStep
{
public string Step { get; set; }
}
internal class Test_Int
{
private BindingList<TestStep> _steps;
@starteleport
starteleport / HtmlFormat.cs
Last active December 10, 2015 23:48
ServiceStack ServiceStack\WebHost.Endpoints\Formats\HtmlFormat.cs
public void SerializeToStream(IRequestContext requestContext, object response, IHttpResponse httpRes)
{
var httpReq = requestContext.Get<IHttpRequest>();
if (httpReq != null && AppHost.ViewEngines.Any(x => x.ProcessRequest(httpReq, httpRes, response))) return;
if (requestContext.ResponseContentType != ContentType.Html && httpReq != null
&& httpReq.ResponseContentType != ContentType.JsonReport) return;
var dto = response.ToDto();
var html = dto as string;