Ejemplo n.º 1
0
        public void LoadFile(string file, string name = null)
        {
            if (!Path.IsPathRooted(file))
            {
                file = AppContext.BaseDirectory.AppendPath(file);
            }

            var function = TransformFunction.ForFile(_options, file, name);

            AddFunction(function);
        }
Ejemplo n.º 2
0
        private TransformFunction loadPatchDoc()
        {
            var stream = GetType().Assembly.GetManifestResourceStream("Marten.PLv8.mt_patching.js");
            var js     = stream.ReadAllText().Replace("{databaseSchema}", _options.DatabaseSchemaName);

            var patching = new TransformFunction(_options, PatchDoc, js);

            patching.OtherArgs.Add("patch");

            Load(patching);

            return(patching);
        }
 public DocumentTransformOperationFragment(IDocumentStorage storage, TransformFunction function)
 {
     _storage  = storage;
     _function = function;
 }
Ejemplo n.º 4
0
 public void Load(TransformFunction function)
 {
     AddFunction(function);
 }
Ejemplo n.º 5
0
        public void LoadJavascript(string name, string script)
        {
            var func = new TransformFunction(_options, name, script);

            AddFunction(func);
        }
Ejemplo n.º 6
0
 public TransformSelectClause(TransformFunction function, ISelectClause inner) : base(inner.FromObject, $"{function.Identifier}(d.data)")
 {
 }