/// Declare callback functions public AStyleInterface(ILog log = null) { AStyleMemAlloc = new AStyleMemAllocDelgate(OnAStyleMemAlloc); AStyleError = new AStyleErrorDelgate(OnAStyleError); this.log = log ?? new ConsoleLog(); }
private static extern IntPtr AStyleMain ( [MarshalAs(UnmanagedType.LPStr)] String sIn, [MarshalAs(UnmanagedType.LPStr)] String sOptions, AStyleErrorDelgate errorFunc, AStyleMemAllocDelgate memAllocFunc );
public int defaultMinConditionalIndent; // default minConditionalIndent /// Constructor public AStyleInterface() { // Declare callback functions AStyleMemAlloc = new AStyleMemAllocDelgate(OnAStyleMemAlloc); AStyleError = new AStyleErrorDelgate(OnAStyleError); // save integer default values defaultIndentLength = indentLength; defaultMaxInStatementIndent = maxInStatementIndent; defaultMinConditionalIndent = minConditionalIndent; }
private static IntPtr AStyleMainUtf16(String textIn, String options, AStyleErrorDelgate AStyleError, AStyleMemAllocDelgate AStyleMemAlloc) { return (IntPtr.Size == 4 ? AStyleMainUtf16_32(textIn, options, AStyleError, AStyleMemAlloc) : AStyleMainUtf16_64(textIn, options, AStyleError, AStyleMemAlloc)); }
/// <summary> /// Declare callback functions. /// </summary> public AStyleInterface() { AStyleMemAlloc = new AStyleMemAllocDelgate(OnAStyleMemAlloc); AStyleError = new AStyleErrorDelgate(OnAStyleError); }
private static extern IntPtr AStyleMainUtf16_64([MarshalAs(UnmanagedType.LPWStr)] String sIn, [MarshalAs(UnmanagedType.LPWStr)] String sOptions, AStyleErrorDelgate errorFunc, AStyleMemAllocDelgate memAllocFunc);
private static extern IntPtr AStyleMainUtf16( [MarshalAs(UnmanagedType.LPWStr)] string textIn, [MarshalAs(UnmanagedType.LPWStr)] string options, AStyleErrorDelgate AStyleError, AStyleMemAllocDelgate AStyleMemAlloc );
private int defaultMinConditionalOption; // default minConditionalOption // private int defaultMaxCodeLength; // default maxCodeLength /// Constructor public AStyleInterface() { // Declare callback functions AStyleMemAlloc = new AStyleMemAllocDelgate(OnAStyleMemAlloc); AStyleError = new AStyleErrorDelgate(OnAStyleError); // save integer default values defaultIndentLength = indentLength; defaultTabLength = tabLength; defaultMaxInStatementIndent = maxInStatementIndent; defaultMinConditionalOption = minConditionalOption; // defaultMaxCodeLength = maxCodeLength; }
/// Declare callback functions. public AStyleInterface() { AStyleMemAlloc = new AStyleMemAllocDelgate(OnAStyleMemAlloc); AStyleError = new AStyleErrorDelgate(OnAStyleError); }
private static IntPtr AStyleMainUtf16(String textIn, String options, AStyleErrorDelgate AStyleError, AStyleMemAllocDelgate AStyleMemAlloc) { return(IntPtr.Size == 4 ? AStyleMainUtf16_32(textIn, options, AStyleError, AStyleMemAlloc) : AStyleMainUtf16_64(textIn, options, AStyleError, AStyleMemAlloc)); }