13.07.2015 Views

Using the Caché Managed Provider for .NET - InterSystems ...

Using the Caché Managed Provider for .NET - InterSystems ...

Using the Caché Managed Provider for .NET - InterSystems ...

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Using</strong> <strong>Caché</strong> Proxy Classes5.2.3 Generating Proxy Files ProgrammaticallyThe CacheConnection class includes <strong>the</strong> following three methods that can be used to generate proxyfiles from within a .<strong>NET</strong> program:CacheConnection.GenSourceFile()Generates a new CS or VB proxy file that may contain definitions <strong>for</strong> several classes.CacheConnection.GenSourceFile(filepath, generator, classlist, options, errors);Parameters:• filepath — A string containing <strong>the</strong> path and filename of <strong>the</strong> file to be generated.• generator — An ICodeGenerator object that generates ei<strong>the</strong>r CS or VB code.• classlist — An IEnumerator iterator pointing to <strong>the</strong> list of classes that will be generated.• options — a GeneratorOptions object• errors — An IList array used to store any returned error messages.CacheConnection.GenMultipleSourceFiles()Generates a separate CS or VB proxy file named . <strong>for</strong> eachclass in classlist.CacheConnection.GenMultipleSourceFiles(dirpath, filetype, generator, classlist,options, errors);Parameters:• dirpath — A string containing <strong>the</strong> directory path <strong>for</strong> <strong>the</strong> files to be generated.• filetype — A string containing ei<strong>the</strong>r ".vb" or ".cs", depending on <strong>the</strong> code to begenerated.• generator — An ICodeGenerator object that generates ei<strong>the</strong>r CS or VB code.• classlist — An IEnumerator iterator pointing to <strong>the</strong> list of classes that will be generated.• options — A GeneratorOptions• errors — An IList array used to store any returned error messages.CacheConnection.GenAssembly()Generates an assembly file.32 <strong>Using</strong> <strong>the</strong> <strong>Caché</strong> <strong>Managed</strong> <strong>Provider</strong> <strong>for</strong> .<strong>NET</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!