/// <summary> /// Contracts for <see cref="IWeave.Initialize"/> /// </summary> /// <param name="weavingContext">Context data for command initialization.</param> /// <param name="weaveConfig">Configuration data for the command. Commands may require particular types for this argument that are subtypes of <see cref="WeaveConfigTypeBase"/></param> public void Initialize(IWeavingContext weavingContext, WeaveConfigTypeBase weaveConfig) { Contract.Requires(weavingContext != null); Contract.Requires(!this.IsInitialized); Contract.Ensures(this.IsInitialized); throw new NotSupportedException(); }
/// <summary> /// Initializes the weave. /// </summary> /// <param name="weavingContext">Weaving context that is initializing the weave.</param> /// <param name="weaveConfig">Must be null for this type of weave.</param> public void Initialize(IWeavingContext weavingContext, WeaveConfigTypeBase weaveConfig) { this.IsInitialized = true; }
/// <summary> /// Initializes the command using context and configuration information. /// </summary> /// <param name="weavingContext">Context information for configuration.</param> /// <param name="weaveConfig">Command configuration information. For this command type, the value must be of type <see cref="WeaveConfigTypeBase"/>.</param> /// <exception cref="ArgumentException">The <paramref name="weaveConfig"/> is not of type <see cref="WeaveConfigTypeBase"/></exception> public void Initialize(IWeavingContext weavingContext, WeaveConfigTypeBase weaveConfig) { this.Config = weaveConfig as InterfaceMixinConfigType; this.IsInitialized = true; }