Exemplo n.º 1
0
        /// <summary>
        /// If the given property has a non null value then that value is persisted for the next use.
        /// </summary>
        /// <param name="Context">Used to see if the property was specified.</param>
        public override void AfterPopulateProperty(HookContext Context)
        {
            if (Context.ArgumentValue != null)
            {
                if (userSpecifiedPersistenceProvider == null && Context.Definition.Metadata.HasMeta <StickyArgPersistence>())
                {
                    userSpecifiedPersistenceProvider = Context.Definition.Metadata.Meta <StickyArgPersistence>().PersistenceProvider;
                }

                SetStickyArg(Context.CurrentArgument.DefaultAlias, Context.ArgumentValue);
            }
        }
Exemplo n.º 2
0
    /// <summary>
    /// If the given property has a non null value then that value is persisted for the next use.
    /// </summary>
    /// <param name="Context">Used to see if the property was specified.</param>
    public override void AfterPopulateProperty(HookContext Context)
    {
        if (Context.ArgumentValue != null)
            {
                if (userSpecifiedPersistenceProvider == null && Context.Definition.Metadata.HasMeta<StickyArgPersistence>())
                {
                    userSpecifiedPersistenceProvider = Context.Definition.Metadata.Meta<StickyArgPersistence>().PersistenceProvider;
                }

                SetStickyArg(Context.CurrentArgument.DefaultAlias, Context.ArgumentValue);
            }
    }
Exemplo n.º 3
0
        /// <summary>
        /// If the given property has a non null value then that value is persisted for the next use.
        /// </summary>
        /// <param name="Context">Used to see if the property was specified.</param>
        public override void AfterPopulateProperty(HookContext Context)
        {
            if (Context.ArgumentValue != null)
            {
                if (userSpecifiedPersistenceProvider == null && Context.Property.DeclaringType.HasAttr<StickyArgPersistence>())
                {
                    userSpecifiedPersistenceProvider = Context.Property.DeclaringType.Attr<StickyArgPersistence>().PersistenceProvider;
                }

                SetStickyArg(Context.Property.GetArgumentName(), Context.ArgumentValue);
            }
        }