Version 1.15 (18. May 2013)

General

  • CHG: Assemblies targeting .NET Framework 4.5 are now compiled against the official version 4.5.9 of Microsoft.TPL.Dataflow. Assemblies targeting .NET Framework 4.0 are now compiled against the offical version 1.0.16 of Microsoft.Bcl.Async, which replaces Microsoft.CompilerServices.AsyncTargetingPack, and the latest CTP version of Microsoft.TPL.Dataflow.

amarok.common

  • NEW: Introduced base class IdentifiableObject, which manages an object-id consisting of the object's type-name and an optional instance-name. The object-id, a string formatted as "type-name[:instance-name]" can be used to distinguish object instances of the same type.

  • CHG: [Breaking] The base classes DisposableObject and CompletableObject now derive from IdentifiableObject and therefore provide new appropriate constructor overloads.

  • CHG: [Breaking] Changed return type of extension method WaitQuietly(..) on TaskExtensions from Task to void. Now, the method is consistent to other Wait() methods, e.g. Task.Wait(). Please note that the method no longer accepts null values.

  • FIX: [Severe] Fixed a dead-lock that could occur when calling WaitQuietly() from within a message handler with exclusive execution mode.

  • NEW: Introduced overloads of extension method WaitQuietly(..) on TaskExtensions that accept a timeout similar to Task.Wait(Int32) and Task.Wait(TimeSpan).

  • NEW: Added static methods GetAssemblyProduct(), GetAssemblyCompany() and GetAssemblyCopyright() on Helper that can be used to obtain product name, company and copyright notice defined via assembly-level attributes.

  • CHG: [Breaking] Renamed method Append() on BufferSegment to Add() to comply with framework design guidelines.

amarok.agents

General
  • FIX: [Severe] The processing order of message handler with exclusive execution context was not correct. This has been fixed.

  • CHG: [Breaking] Removed interface ISubscription. Now, ICompletable is used instead. Since ISubscription already derived from ICompletable, this breaking change should be easy to fix.

  • NEW: Added overloads of PostOperation() and PublishOperation() on Agent, Runtime, DispatcherExtensions and PublisherExtensions that accept a CancellationToken. The posted/published operation will be canceled when the supplied CancellationToken is being canceled.

  • NEW: Added overloads of PostAfter() and PublishAfter() on Agent, DispatcherExtensions and PublisherExtensions. These methods will post/publish a message after a given time delay.

  • NEW: Introduced new MessageBusConnectedAttribute that can be assigned to Agent or Controller implementation types to specify that this agent/controller should be automatically connected to the runtime's message bus after being spawned. This new mechanism only works for agents and controllers spawned via Agent.Factory or Controller.Factory, which is generally the recommended way.

  • CHG: [Breaking] Unified the way when and how agents get automatically connected to the runtime's message bus. Previous, only agents spawned from within subsystems were automatically connected to the message bus. This concept was unclear and did not help in managing agents spawned by other agents. Now, all agents that are spawned via Agent.Factory AND that receive an agent environment of RuntimeEnvironment or derived AND that are tagged with the new MessageBusConnectedAttribute are automatically connected to the message bus that is supplied via the given runtime environment.

Agent
  • CHG: [Breaking] Renamed protected method GetAgentReference() on Agent to ToAgentReference(). Renamed extension method GetAgentReference() on AgentExtensions to ToAgentReference().

  • CHG: The type AgentSpawnException is no longer sealed. You can derive your own types from it.

  • NEW: Introduced static property Factory on Agent. This property returns the default agent factory represented by interface IAgentFactory. Various overloads are provided via extension methods. The default factory behavior is implemented in DefaultAgentFactory, from which one can derive to override the default behavior. The new specific agent factory can be registered via SetFactory() on Agent.

  • CHG: [Breaking] Removed AgentFactory. Instead of AgentFactory.SpawnAgent(..) call Agent.Factory.SpawnAgent(..).

Runtimes
  • CHG: RuntimeStartException is no longer sealed.

  • CHG: The implementation of Runtime is now thread-safe in respect to loading other subsystems.

Subsystems
  • NEW: Introduced static property Factory on Subsystem. This property returns the default subsystem factory represented by interface ISubsystemFactory. Various overloads are provided via extension methods. The default factory behavior is implemented in DefaultSubsystemFactory, from which one can derive to override the default behavior. The new specific subsystem factory can be registered via SetFactory() on Subsystem.

  • CHG: [Breaking] Removed SubsystemFactory. Instead of SubsystemFactory.LoadSubsystem(..) call Subsystem.Factory.LoadSubsystem(..).

  • CHG: SubsystemLoadException is no longer sealed. You can derive your own types from it.

  • CHG: ISubsystem.Load() will always throw exceptions of type SubsystemLoadException.

  • CHG: The implementation of Subsystem is now thread-safe in respect to loading and spawning other subsystems and agents.

amarok.presentation

General
  • NEW: Introduced type Designer that provides design-time helpers. The properties IsDesignMode and IsRuntimeMode can be used to determine whether code is running in design-time, e.g. within Visual Studio or Expression Blend.

  • NEW: Introduced new extension methods Localize() that can be used to apply localized text resources to common WPF controls like Button, Label, TextBlock, Expander, etc. For example, you can now call MyButton.Localize(..) in your Window's code-behind instead of MyButton.Content = text.

ViewCommand
  • CHG: ViewCommand and ViewCommand are no longer sealed. The methods CanExecute(), Execute() and RaiseCanExecuteChanged() are now virtual, so that it is possible to derive from those types and override the default behavior.

  • CHG: ViewCommand and ViewCommand no longer add event handler to CommandManager.RequerySuggested when no CanExecute action is specified, because without an CanExecute action the command never changes its state that determines whether the command can be executed, thus, the CanExecuteChanged event will never be raised.

  • NEW: Added optional constructor argument ignoreNullParameter on ViewCommand that defaults to true. This new boolean value indicates whether calls to CanExecute(T) or Execute(T) should be ignored when T equals to null. This is useful for commands with data-bound CommandParameter, because WPF calls CanExecute(T) once directly after resolving the data binding with the command parameter set to null.

  • NEW: ViewCommand and ViewCommand now implement IDisposable. The specified CanExecute() and Execute() callbacks won't be called anymore after disposing a command instance.

ViewModel
  • CHG: Changed method RaisePropertyChanged(String propertyName) so that the argument propertyName is optional. If the argument is not specified, the name of the calling method, property or event is automatically inserted by the compiler, thus, it is enough to call RaisePropertyChanged() from within a property's setter method.

  • NEW: Added support for handling parent references to ViewModel. Introduced properties HasParent and Parent. The parent view model can be specified via constructor or by setting property Parent. Property-changed notifications for HasParent and Parent will be raised appropriately.

  • NEW: Introduced generic base class ViewModel, which can be used whenever the reference to the parent view model should be type-safe.

  • NEW: Introduced methods SetProperty(..) on ViewModel. Those methods can be used within a property's setter method to assign the new value to the backing field and raise a corresponding property-changed notification.

  • BUG: Fixed bug in VerifyPropertyName() that results in cases where an AmbiguousMatchException was thrown.

View
  • NEW: Introduced overrideable method OnLocalize() on ViewWindow, ViewUserControl and FrameworkElementViewAdapter. This overridable method is called once after the view has been loaded. Override this method to localize static text resources.

  • NEW: Introduced overrideable method OnLoaded() on ViewWindow, ViewUserControl and FrameworkElementViewAdapter. This overridable method is called once after the view has been loaded. Override this method to implement specific logic requiring the view to be fully initialized and loaded, e.g. the entire tree of UI elements is loaded and the view model is assigned to the view.

Controller
  • FIX: [Breaking] The properties View and ViewModel are no longer visible to derived types. This was not intended. Derived controller types should use AccessView() or AccessViewModel() to safely access the view/view model in the context of the user interface thread.

  • CHG: [Breaking] ControllerFactory now throws ControllerSpawnException whenever the instantiation of a controller fails.

  • CHG: [Breaking] Unified the way when and how controllers get automatically connected to the runtime's message bus. Previous, only controllers spawned from within subsystems were automatically connected to the message bus. This concept was unclear and did not help in managing controllers spawned by other controllers. Now, all controllers that are spawned via ControllerFactory AND that receive an agent environment of RuntimeEnvironment or derived AND that are tagged with the new MessageBusConnectedAttribute are automatically connected to the message bus that is supplied via the given runtime environment.

  • NEW: Introduced overridable method OnPresetViewModel() on Controller, which is called once during construction to give derived types a chance to pre-initialize the view model before it is assigned to the view. Override this method to initialize the given view model to its initial state, e.g. instantiate and assign commands.

Last edited May 18, 2013 at 9:44 AM by OlafKober, version 1

Comments

No comments yet.