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 IndexView : CodeView<IndexViewModel> | |
{ | |
protected override void Render(CQ doc, IndexViewModel model, ViewContext viewContext) | |
{ | |
doc["body"].Append("<div>" + viewContext.ViewBag.Message + "</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
using System; | |
using System.ComponentModel; | |
using System.Globalization; | |
using Lucene.Net.Documents; | |
namespace Lucene.Net.Linq.Converters | |
{ | |
public class DateTimeConverter : TypeConverter | |
{ | |
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) |
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
void SyncToSignalR<T>(ObservableCollection<T> oc) | |
{ | |
oc.OnCollectionChanged += (o, e) { Hub.Send(e.NewItems.Cast<T>()); } | |
//race condition, what if OnCollectionChanged fires before send is donev | |
Hub.Send(oc)); | |
} | |
//alternatiive | |
void SyncToSignalR2<T>(ObservableCollection<T> oc) | |
{ |
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 partial class ProfiledSql2008ClientDriver : IEmbeddedBatcherFactoryProvider | |
{ | |
System.Type IEmbeddedBatcherFactoryProvider.BatcherFactoryClass | |
{ | |
get { return typeof(ProfiledSqlClientBatchingBatcherFactory); } | |
} | |
} | |
public class ProfiledSqlClientBatchingBatcherFactory : SqlClientBatchingBatcherFactory | |
{ | |
public override NHibernate.Engine.IBatcher CreateBatcher(ConnectionManager connectionManager, NHibernate.IInterceptor interceptor) |
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.Generic; | |
using System.Data; | |
using System.Data.Common; | |
using System.Data.SqlClient; | |
using System.Linq; | |
using System.Runtime.Remoting.Messaging; | |
using System.Runtime.Remoting.Proxies; | |
using System.Text; | |
using System.Web; |
NewerOlder