Beispiel #1
0
 public ArrayMarshaller(IMarshallingGenerator manualMarshallingGenerator, TypeSyntax elementType, bool enablePinning, InteropGenerationOptions options)
 {
     _manualMarshallingGenerator = manualMarshallingGenerator;
     _elementType   = elementType;
     _enablePinning = enablePinning;
     _options       = options;
 }
 public AttributedMarshallingModelGeneratorFactory(
     IMarshallingGeneratorFactory innerMarshallingGenerator,
     InteropGenerationOptions options)
 {
     Options = options;
     _innerMarshallingGenerator = innerMarshallingGenerator;
     // Unless overridden, default to using this generator factory for creating generators for collection elements.
     _elementMarshallingGenerator = this;
 }
        public AttributedMarshallingModelGeneratorFactory(
            IMarshallingGeneratorFactory innerMarshallingGenerator,
            IMarshallingGeneratorFactory elementMarshallingGenerator,
            InteropGenerationOptions options)
        {
            Options = options;
            _innerMarshallingGenerator = innerMarshallingGenerator;

            _elementMarshallingGenerator = elementMarshallingGenerator;
        }
Beispiel #4
0
 public static string Unsafe(InteropGenerationOptions options)
 {
     return(options.UseInternalUnsafeType ? Internal_Runtime_CompilerServices_Unsafe : System_Runtime_CompilerServices_Unsafe);
 }
Beispiel #5
0
 public static string MarshalEx(InteropGenerationOptions options)
 {
     return(options.UseMarshalType ? System_Runtime_InteropServices_Marshal : System_Runtime_InteropServices_MarshalEx);
 }
Beispiel #6
0
 public static string Unsafe(InteropGenerationOptions options)
 {
     return(System_Runtime_CompilerServices_Unsafe);
 }