Example #1
0
 protected override object OnExecute(IExecutionContext ctx, params object[] parms) {            
     var folder = Folder.GetGenericValue(ctx).ToString().Unescape();
     var filter = Filter.GetGenericValue(ctx).ToString().Unescape();
     var alias = new Alias(AliasName, folder, filter);
     ctx.AddAlias(alias);
     return alias;
 }
Example #2
0
        public Alias GetValue(IExecutionContext ctx)
        {
            // Do we have this alias already defined in the context?
            var results = ctx.GetAlias(AliasName);

            if (results != null)
            {
                return(results);
            }

            var alias = new Alias(AliasName, Folder);

            if (!string.IsNullOrWhiteSpace(Folder))
            {
                ctx.AddAlias(alias);
            }
            return(alias);
        }