Posted 18 years ago
by Alex
I have two questions regarding code snippets
1. In CodeSnippet constructor what format should have the codeText parameter? I tried to use the snippet XML definition for that, but in this case the snippet actually inserts the entire xml as a block of text. How can I format the codeText to make it working as if it was loaded from the file?
2. There is a method LoadFromXML(string path). In my case I have snippet definitions embedded as string resources. Is there any way to load the snippets directly from a string? Of course I can save it into a temp file first, but it looks like artificial step.
Thanks
Alex
1. In CodeSnippet constructor what format should have the codeText parameter? I tried to use the snippet XML definition for that, but in this case the snippet actually inserts the entire xml as a block of text. How can I format the codeText to make it working as if it was loaded from the file?
2. There is a method LoadFromXML(string path). In my case I have snippet definitions embedded as string resources. Is there any way to load the snippets directly from a string? Of course I can save it into a temp file first, but it looks like artificial step.
Thanks
Alex