This file contains hidden or 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
| WPF Client App: | |
| public partial class App : Application | |
| { | |
| public static IBus Bus { get; set; } | |
| protected override void OnStartup(StartupEventArgs e) | |
| { | |
| base.OnStartup(e); | |
| Bus = Configure.With() | |
| .Log4Net() |
This file contains hidden or 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
| Castle.MicroKernel.ComponentActivator.ComponentActivatorException was unhandled | |
| Message=Error setting property set_MessageTypes on type NServiceBus.Serializers.XML.MessageSerializer, Component id is NServiceBus.Serializers.XML.MessageSerializer. See inner exception for more information. | |
| Source=Castle.MicroKernel | |
| StackTrace: | |
| at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.SetUpProperties(Object instance, CreationContext context) | |
| at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context) | |
| at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context) | |
| at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Resolve(CreationContext context) | |
| at Castle.MicroKernel.Lifestyle.SingletonLifestyleManager.Resolve(CreationContext context) | |
| at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean track) |
This file contains hidden or 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
| A Message gets handled through NSB and the following code is run: | |
| public void Handle(UpdateProductData message) | |
| { | |
| var product = session.Get<Product>(message.ProductDto.Id); | |
| product.Name = message.ProductDto.Name; | |
| product.PartNumber = message.ProductDto.PartNumber; | |
| product.Price = message.ProductDto.Price; | |
| session.Update(product); | |
| Logger.InfoFormat("Updated Product {0}", product.Id); |
This file contains hidden or 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 MultiResourceWrapper : DynamicObject | |
| { | |
| private readonly Dictionary<string, object> resources = new Dictionary<string, object>(); | |
| public MultiResourceWrapper() | |
| { | |
| var assemblyNamespace = this.GetType().Assembly.GetManifestResourceNames(); | |
| foreach (var s in assemblyNamespace) | |
| { | |
| var manager = new ResourceManager(ExtractResourceFullName(s), GetType().Assembly); | |
| var name = ExtractResourceName(s); |
This file contains hidden or 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
| once = (func) -> | |
| calls = 0 | |
| -> | |
| calls+=1 | |
| if (calls > 1) | |
| throw "baad girl" | |
| func.apply(this, arguments) | |
| m = once -> alert "hello" |
This file contains hidden or 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
| <h2>Create</h2> | |
| @{ Html.RenderPartial("form"); } |
This file contains hidden or 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 void CreateSchema() | |
| { | |
| using (var sqlConnection = new SqlConnection(connectionString)) | |
| { | |
| sqlConnection.Open(); | |
| using (var tx = sqlConnection.BeginTransaction()) | |
| { | |
| foreach(var dto in dtos) | |
| { | |
| try |
This file contains hidden or 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
| waitForAjaxRequestsToComplete = (callback, functions) -> | |
| successes = 0 | |
| failures = 0 | |
| failedCalls = [] | |
| $(functions).each (index, item) -> | |
| item.done -> | |
| successes += 1 | |
| item.fail -> | |
| failures += 1 | |
| failedCalls.push item |
This file contains hidden or 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
| @import "mixins.less"; | |
| .content | |
| { | |
| border: 3px solid red; | |
| .curves(4px); | |
| } |
This file contains hidden or 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
| de: | |
| errors: | |
| messages: | |
| not_found: "nicht gefunden" | |
| already_confirmed: "wurde bereits bestätigt" | |
| not_locked: "ist nicht gesperrt" | |
| devise: | |
| failure: | |
| unauthenticated: 'Sie müssen sich anmelden oder registrieren, bevor Sie fortfahren können.' |
OlderNewer