public override int GetExpansionFunction(IXMLDOMNode xmlFunctionNode, string bstrFieldName, out IVsExpansionFunction pFunc) { string snippetFunctionName, param; if (!TryGetSnippetFunctionInfo(xmlFunctionNode, out snippetFunctionName, out param)) { pFunc = null; return VSConstants.E_INVALIDARG; } switch (snippetFunctionName) { case "SimpleTypeName": pFunc = new SnippetFunctionSimpleTypeName(this, TextView, SubjectBuffer, bstrFieldName, param); return VSConstants.S_OK; case "ClassName": pFunc = new SnippetFunctionClassName(this, TextView, SubjectBuffer, bstrFieldName); return VSConstants.S_OK; case "GenerateSwitchCases": pFunc = new SnippetFunctionGenerateSwitchCases(this, TextView, SubjectBuffer, bstrFieldName, param); return VSConstants.S_OK; default: pFunc = null; return VSConstants.E_INVALIDARG; } }
public int GetExpansionFunction(MSXML.IXMLDOMNode xmlFunctionNode, string bstrFieldName, out IVsExpansionFunction pFunc) { pFunc = null; return(VSConstants.S_OK); }
public virtual int GetExpansionFunction(MSXML.IXMLDOMNode xmlFunctionNode, string fieldName, out IVsExpansionFunction func) { XmlDocument doc = new XmlDocument(); doc.XmlResolver = null; using (StringReader stream = new StringReader(xmlFunctionNode.xml)) using (XmlReader reader = XmlReader.Create(stream, new XmlReaderSettings() { DtdProcessing = DtdProcessing.Prohibit, XmlResolver = null })) { doc.Load(reader); func = GetExpansionFunction(doc.DocumentElement, fieldName); } return(NativeMethods.S_OK); }
public int GetExpansionFunction(MSXML.IXMLDOMNode xmlFunctionNode, string bstrFieldName, out IVsExpansionFunction pFunc) { pFunc = null; return VSConstants.S_OK; }
public override int GetExpansionFunction(IXMLDOMNode xmlFunctionNode, string bstrFieldName, out IVsExpansionFunction pFunc) { if (!TryGetSnippetFunctionInfo(xmlFunctionNode, out var snippetFunctionName, out var param)) { pFunc = null; return(VSConstants.E_INVALIDARG); } switch (snippetFunctionName) { case "SimpleTypeName": pFunc = new SnippetFunctionSimpleTypeName(this, TextView, SubjectBuffer, bstrFieldName, param); return(VSConstants.S_OK); case "ClassName": pFunc = new SnippetFunctionClassName(this, TextView, SubjectBuffer, bstrFieldName); return(VSConstants.S_OK); case "GenerateSwitchCases": pFunc = new SnippetFunctionGenerateSwitchCases(this, TextView, SubjectBuffer, bstrFieldName, param); return(VSConstants.S_OK); default: pFunc = null; return(VSConstants.E_INVALIDARG); } }
public abstract int GetExpansionFunction(IXMLDOMNode xmlFunctionNode, string bstrFieldName, out IVsExpansionFunction pFunc);
public abstract int GetExpansionFunction(IXMLDOMNode xmlFunctionNode, string bstrFieldName, out IVsExpansionFunction pFunc);
public virtual int GetExpansionFunction(MSXML.IXMLDOMNode xmlFunctionNode, string fieldName, out IVsExpansionFunction func) { XmlDocument doc = new XmlDocument(); doc.XmlResolver = null; using(StringReader stream = new StringReader(xmlFunctionNode.xml)) using (XmlReader reader = XmlReader.Create(stream, new XmlReaderSettings() { DtdProcessing = DtdProcessing.Prohibit, XmlResolver = null })) { doc.Load(reader); func = GetExpansionFunction(doc.DocumentElement, fieldName); } return NativeMethods.S_OK; }
/// <include file='doc\ExpansionProvider.uex' path='docs/doc[@for="ExpansionProvider.GetExpansionFunction"]/*' /> public virtual int GetExpansionFunction(MSXML.IXMLDOMNode xmlFunctionNode, string fieldName, out IVsExpansionFunction func) { XmlDocument doc = new XmlDocument(); doc.LoadXml(xmlFunctionNode.xml); func = GetExpansionFunction(doc.DocumentElement, fieldName); return NativeMethods.S_OK; }
/// <include file='doc\ExpansionProvider.uex' path='docs/doc[@for="ExpansionProvider.GetExpansionFunction"]/*' /> public virtual int GetExpansionFunction(MSXML.IXMLDOMNode xmlFunctionNode, string fieldName, out IVsExpansionFunction func) { XmlDocument doc = new XmlDocument(); doc.LoadXml(xmlFunctionNode.xml); func = GetExpansionFunction(doc.DocumentElement, fieldName); return(NativeMethods.S_OK); }