private void WriteInterfaceFunction(ContextFunction function) { if (!string.IsNullOrEmpty(function.ReturnType)) { Writer.WriteLine(Tabs + string.Format("{0}{3} {1}({2});", function.ReturnType, function.MethodName, function.GetSignature(), function.IsComposable && function.ReturnType != "System.String" ? "?" : string.Empty)); } else { Writer.WriteLine(Tabs + string.Format("{0}<{1}> {2}({3});", function.IsComposable ? "IQueryable" : "ISingleResult", function.ReturnElement, function.MethodName, function.GetSignature())); } }
private void WriteInterfaceFunction(ContextFunction function) { if (!string.IsNullOrEmpty(function.ReturnType)) { Writer.WriteLine(Tabs + string.Format("Function {1}({2}) As {0}", function.IsComposable && function.ReturnType != "System.String" ? "Nullable(Of " + function.ReturnType + ")" : function.ReturnType, function.MethodName, function.GetSignatureForVB())); } else { Writer.WriteLine(Tabs + string.Format("Function {2}({3}) As {0}(Of {1})", function.IsComposable ? "IQueryable" : "ISingleResult", function.ReturnElement, function.MethodName, function.GetSignatureForVB())); } }
private void WriteProxyFunction(ContextFunction function) { Writer.WriteLine(); if (!string.IsNullOrEmpty(function.ReturnType)) { Writer.WriteLine(Tabs + string.Format("Private Function {1}_proxy({2}) As {0} Implements {3}.{1}", function.IsComposable && function.ReturnType != "System.String" ? "Nullable(Of " + function.ReturnType + ")" : function.ReturnType, function.MethodName, function.GetSignatureForVB(), InterfaceName)); } else { Writer.WriteLine(Tabs + string.Format("Private Function {2}_proxy({3}) As {0}(Of {1}) Implements {4}.{2}", function.IsComposable ? "IQueryable" : "ISingleResult", function.ReturnElement, function.MethodName, function.GetSignatureForVB(), InterfaceName)); } _tabCount++; Writer.WriteLine(Tabs + string.Format("Return {0}({1})", function.MethodName, function.GetCallForVB())); CloseFunction(); }
private void WriteInterfaceFunction(ContextFunction function) { if (!string.IsNullOrEmpty(function.ReturnType)) Writer.WriteLine(Tabs + string.Format("{0}{3} {1}({2});", function.ReturnType, function.MethodName, function.GetSignature(), function.IsComposable && function.ReturnType != "System.String" ? "?" : string.Empty)); else Writer.WriteLine(Tabs + string.Format("{0}<{1}> {2}({3});", function.IsComposable ? "IQueryable" : "ISingleResult", function.ReturnElement, function.MethodName, function.GetSignature())); }