Ejemplo n.º 1
0
        public override void SetUp()
        {
            base.SetUp();

            _implementationMock = MockRepository.GenerateMock <IBindableDomainObjectImplementation> ();

            _propertyFake            = MockRepository.GenerateMock <IBusinessObjectProperty> ();
            _businessObjectClassFake = MockRepository.GenerateMock <IBusinessObjectClass> ();
        }
        protected override void OnReferenceInitializing()
        {
            base.OnReferenceInitializing();

            if (_implementation == null) // may have been set by ctor
            {
                _implementation = BindableDomainObjectImplementation.Create(this);
            }
        }
 protected SampleBindableDomainObject(IBindableDomainObjectImplementation implementation)
 {
     PrivateInvoke.SetNonPublicField(this, "_implementation", implementation);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="BindableDomainObject"/> class in the process of deserialization.
 /// </summary>
 /// <param name="info">The <see cref="SerializationInfo"/> coming from the .NET serialization infrastructure.</param>
 /// <param name="context">The <see cref="StreamingContext"/> coming from the .NET serialization infrastructure.</param>
 /// <remarks>Be sure to call this base constructor from the deserialization constructor of any concrete <see cref="BindableDomainObject"/> type
 /// implementing the <see cref="ISerializable"/> interface.</remarks>
 protected BindableDomainObject(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     _implementation = (IBindableDomainObjectImplementation)info.GetValue("BDO._implementation", typeof(IBindableDomainObjectImplementation));
 }
 public static SampleBindableDomainObject NewObject(IBindableDomainObjectImplementation implementation)
 {
     return(NewObject <SampleBindableDomainObject> (ParamList.Create(implementation)));
 }