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
[Test] | |
public void Can_fluently_wire_events() | |
{ | |
container.Register(Component.For<SimplePublisher>().PublishEvent(sp => sp.Event += null, "myUniqueEventId"), | |
Component.For<SimpleListener>().SubscribeEvent("myUniqueEventId", (sl, sender, args) => sl.OnPublishEvent(sender, args) )); | |
var publisher = container.Resolve<SimplePublisher>(); | |
var listener = container.Resolve<SimpleListener>(); | |
Assert.IsFalse(listener.Listened); |
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
Console.WriteLine("tell me how many seconds you want to expend doing something else than watching a number. I will beep to remind you"); | |
var seconds = int.Parse(Console.ReadLine()); | |
Thread.Sleep(TimeSpan.FromSeconds(seconds)); | |
Console.Beep(1000, 100); |
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
<asp:UpdatePanel ID="UpdatePanel1" runat="server"> | |
<ContentTemplate> | |
ACA VA EL VALIDATIONSUMMARY!!! | |
</ContentTemplate> | |
<Triggers> | |
<asp:AsyncPostBackTrigger ControlID="ACA EL NOMBRE DEL CONTROL DE USUARIO ADDRESS!" /> | |
</Triggers> | |
</asp:UpdatePanel> |
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 Foo | |
{ | |
public Foo() | |
{ | |
items = new HashedSet<FooItem>(); | |
//Items = new HashedSet<FooItem>(); | |
} | |
private readonly ICollection<FooItem> items; | |
//this fail |
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
Error 25 error: Unhandled exception (2.0.5.1204, 32 bit, CLR 2.0, Release): Error while loading the assembly "D:\pos\myproject\myproject\myproject.xyz\obj\Debug\Before-PostSharp\myproject.xyz.dll": No se puede cargar el archivo o ensamblado 'myproject.xyz, Version=3.0.0.693, Culture=neutral, PublicKeyToken=7591ffb9fc1f47f5' ni una de sus dependencias. Error de validaci贸n del nombre seguro. (Excepci贸n de HRESULT: 0x8013141A) | |
===== Start of PostSharp Assembly Binder =========================== | |
LOG: (ClrHost) GetAssemblyName: {D:\pos\myproject\myproject\myproject.xyz\obj\Debug\Before-PostSharp\myproject.xyz.dll} | |
LOG: Loading assembly from file {D:\pos\myproject\myproject\myproject.xyz\obj\Debug\Before-PostSharp\myproject.xyz.dll}. | |
LOG: NativeDotNet20Platform.LoadAssemblyFromFile: D:\pos\myproject\myproject\myproject.xyz\obj\Debug\Before-PostSharp\myproject.xyz.dll. | |
LOG: (ClrHost) GetAssemblyName: {D:\pos\myproject\myproject\myproject.xyz\obj\Debug\Before-PostSharp\myproject.xyz.dll} | |
LOG: Assembly identity ret |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
using System.Text; | |
using NUnit.Framework; | |
using PostSharp.Aspects; | |
using PostSharp.Aspects.Advices; | |
using PostSharp.Aspects.Dependencies; | |
using PostSharp.Extensibility; |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
using NUnit.Framework; | |
using PostSharp.Aspects; | |
using PostSharp.Aspects.Advices; | |
using PostSharp.Aspects.Dependencies; | |
using PostSharp.CodeModel; | |
using PostSharp.Extensibility; |
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 MovimientoEntity | |
{ | |
private Int64 _idMov; | |
public virtual Int64 idMov | |
{ | |
get { return _idMov; } | |
set { _idMov = value; } | |
} | |
private CuentaEntity _Cuenta; |
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 abstract class PreInsertListenerBase<TEntity> : IPreInsertEventListener | |
where TEntity : class | |
{ | |
public virtual bool OnPreInsert(PreInsertEvent @event) | |
{ | |
var entity = @event.Entity as TEntity; | |
return entity != null && OnPreInsert(entity, @event); | |
} | |
protected abstract bool OnPreInsert(TEntity entity, PreInsertEvent @event); |
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 CargarGrilla() | |
{ | |
try | |
{ | |
var lstMov = bf.GetMovimientoController().FindAll(); | |
gv.DataSource = lstMov.SelectMany( | |
m => m.Lineas.Select(ml => new | |
{ | |
m.idMov, |