示例#1
0
		unsafe public Markdown(Renderer renderer, MarkdownExtensions extensions, int maxNesting)
		{
			this.renderer = renderer;

			ptr = NativeMethods.sd_markdown_new((extensions == null ? 0 : extensions.ToUInt()), (IntPtr)maxNesting,
				renderer.callbacksgchandle.AddrOfPinnedObject(), renderer.opaque);
		}
示例#2
0
		void Dispose(bool disposing)
		{
			if (disposing) {
				GC.SuppressFinalize(this);
			}

			if (ptr != IntPtr.Zero) {
				NativeMethods.sd_markdown_free(ptr);
				ptr = IntPtr.Zero;
			}

			if (buffer != null) {
				buffer.Dispose();
			}

			renderer = null;
		}
示例#3
0
		public Markdown(Renderer renderer, MarkdownExtensions extensions)
			: this(renderer, extensions, 16)
		{
		}
示例#4
0
		public Markdown(Renderer renderer, int maxNesting)
			: this(renderer, null, maxNesting)
		{
		}
示例#5
0
		public Markdown(Renderer renderer)
			: this(renderer, null)
		{
		}