Questions tagged [cci]

The CCI Metadata API allows applications to efficiently analyze or modify .NET assemblies, modules, and debugging (PDB) files. CCI Metadata supports the functionality of the .NET System.Reflection and System.Reflection.Emit APIs, but with much better performance. It also provides additional functionality that is not available in either .NET API.

CCI was created by Microsoft Research, and is currently not under active development and Microsoft is recommending using other tools (e.g. Roslyn).

24 questions
20
votes
2 answers

CCI vs. Mono.Cecil -- advantages and disadvantages

I have seen articles discussing these two similar frameworks, but most of them are two years old or so. I assume both projects are much more mature now than they were two years ago, and the situation is a more complex one. So given the current…
cloudraven
  • 2,484
  • 1
  • 24
  • 49
16
votes
1 answer

Using Roslyn Emit method with a ModuleBuilder instead of a MemoryStream

I was having trouble with performance when using Roslyn to compile to a dynamic assembly. Compilation was taking ~3 seconds, compared to ~300 milliseconds to compile the same code when using the CodeDom compiler. Here's a pared-down version of the…
Jordan Kohl
  • 310
  • 2
  • 8
16
votes
3 answers

Mono Cecil vs. PostSharp Core vs. Microsoft CCI for implementing AOP framework

Which is the better in terms of capabilities, easy of use, documentation, samples, community/support, VS integration, known implementations, long-term viability, and build speed to implement a custom AOP framework? I'll start with what I know (I…
user65199
6
votes
3 answers

Is there a CIL Static Analysis Library like ASM for Java Bytecode?

I am looking for a library for doing custom static code analysis on CIL code. READ: I have no interest in a tool that already does static analysis like those shown here. For custom analysis with Java Bytecodes, I have used ASM and I like the…
Lincoln
  • 1,008
  • 12
  • 20
4
votes
1 answer

Microsoft CCI - resources, references for writing compilers

Some time ago, I was working on compiler, I've used System.Reflection to generate code (IL) from my AST. Now, I've an idea for another compiler that I'd like to work on (it will be another pet project, nothing that will be used in production code,…
Marcin Deptuła
  • 11,789
  • 2
  • 33
  • 41
3
votes
0 answers

Reflection.Emit equivalencies in CCI

Eric Lippert has said on the record here at SO, Reflection.Emit is too weak to use to build a real compiler. It's great for little toy compilation tasks like emitting dynamic call sites and expression trees in LINQ queries, but for the sorts of…
Mason Wheeler
  • 82,511
  • 50
  • 270
  • 477
3
votes
0 answers

How to read assembly from stream instead of file in Common Compiler Infrastructure

In CCI, it is possible to load a .NET assembly from file: var assembly = (IAssembly) new PeReader.DefaultHost().LoadUnitFrom("C:\assembly.dll"); But I can't find any way to load it from any stream. I believe it should be possible because I can…
Piotr Trzpil
  • 282
  • 2
  • 12
2
votes
2 answers

How can I create a new Windows Phone 7 assembly from scratch using CCI or Mono.Cecil

I am working on a tool to generate assemblies for WP7. I am doing this from the full framework. Since Reflection.Emit doesn't work with WP7 but either CCI or Mono.Cecil do I am wondering if there is a way to create new assemblies from scratch. I…
cloudraven
  • 2,484
  • 1
  • 24
  • 49
2
votes
2 answers

Migrating custom Code Analysis rules to VS2012

I have written dozens of custom code analysis rules. The rules were developed targeting Visual Studio 2010. As required, the assembly has a reference to version 10.0 of FxCopSdk, Microsoft.Cci, and Microsoft.VisualStudio.CodeAnalysis. They run…
jalbert
  • 3,047
  • 2
  • 20
  • 21
1
vote
0 answers

Spring 5.3 deprecates CciTemplate

Spring 5.3 deprecates class CciTemplate, CciDaoSupport, etc: * @deprecated as of 5.3, in favor of specific data access APIs * (or native CCI usage if there is no alternative) */ @Deprecated public class CciTemplate implements CciOperations What…
Andrea
  • 11
  • 1
1
vote
1 answer

How to get same cci values from Trading view in Golang?

I'm trying to replicate values from pine script cci() function in golang. I've found this lib https://github.com/markcheno/go-talib/blob/master/talib.go#L1821 but it gives totally different values than cci function does pseudo code how do I use the…
1
vote
1 answer

Determining type of CollectionBase via Reflections (or Microsoft.Cci)

Question: Is there a static way to reliably determine the type contained by a type derived from CollectionBase, using Reflection or Microsoft.Cci? Background: I am working on a code generator that copies types, makes customized versions of those…
Merlyn Morgan-Graham
  • 58,163
  • 16
  • 128
  • 183
1
vote
2 answers

Common Compiler Infrastructure: How to work with ICustomAttribute

I'm attempting to use CCI-Metadata for creating a code generator, by iterating over a set of assemblies, discovering the types and their metadata and then generating the code. I would like to be able to control the code generation by attaching…
Peter Oehlert
  • 16,368
  • 6
  • 44
  • 48
0
votes
0 answers

CCI Y-axiz label

Need some help adding a fixed static label in the right side y-axiz for the CCI indicator I use. The levels where the label must display are fixed ; -200, -100, 0, 100, 200. This is the 5 horizontal lines that I use. Would appreciate help adding the…
CraigV
  • 1
  • 1
0
votes
0 answers

How to make a CumulusCI scratch org available for other projects in a GitHub Action workflow?

"I've created a scratch org via CumulusCI within a GitHub Action workflow using a cci flow, and I need to make it available for other projects in the same workflow (robot framework tests project for example). What steps do I need to take to achieve…
1
2