本文整理汇总了C#中ScriptCoreLib.Special方法的典型用法代码示例。如果您正苦于以下问题:C# ScriptCoreLib.Special方法的具体用法?C# ScriptCoreLib.Special怎么用?C# ScriptCoreLib.Special使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ScriptCoreLib
的用法示例。
在下文中一共展示了ScriptCoreLib.Special方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WebMethod2
/// <summary>
/// This Method is a javascript callable method.
/// </summary>
/// <param name="e">A parameter from javascript.</param>
/// <param name="y">A callback to javascript.</param>
public void WebMethod2()
{
// we would like to have a cursor? can we?
new Data.PerformanceResourceTimingData2.ApplicationPerformance().Insert(
new Data.PerformanceResourceTimingData2ApplicationPerformanceRow { Tag = " hi ", connectStart = 1, connectEnd = 2 }
);
var loc0 = "loc0";
// are we able to provide Funcs from the client?
// do we even have a whitelist of funcs the client can send us?
Func<string, string> Special = x =>
x + " not in sql, at selection on server " + new { loc0 };
var loc1 = new { Special };
var z = from ss in new Data.PerformanceResourceTimingData2.ApplicationPerformance()
orderby ss.Key
//let datagroup0 = new { datagroup0Tag = ss.Tag }
select new
{
datagroup0 = new[] { new { a = 0 }, new { a = 1 } },
// Error 279 An expression tree may not contain an anonymous method expression X:\jsc.svn\examples\javascript\LINQ\test\SelectToUpperIntoNewExpression\SelectToUpperIntoNewExpression\ApplicationWebService.cs 47 29 SelectToUpperIntoNewExpression
// why not?
datagroup3 = new XElement("tag", new XElement("u", ss.Tag), "text element", new XAttribute("style", "color:red;")),
//f = new Action(
// delegate
// {
// }
//),
goo = loc1.Special(ss.Tag),
//goo2 = ss.Tag.StaticSpecial(),
//tuple0 = Tuple.Create(ss.Tag, ss.connectStart),
//dict = new StringDictionary
//dict = new Dictionary<string, string>
//dict = new data(ss.Tag, "goo2")
//{
// ["tag", ss.connectStart] = "complex",
// [ss.Tag] = ss.Tag,
// ["tag"] = "goo",
// $goo = "goo"
//},
datagroup1 = new { datagroup1Tag = ss.Tag, z = "???", datagroup2 = new { datagroup1Tag = ss.Tag.ToLower() } },
datagroup2 = new { datagroup1Tag = ss.Tag.ToUpper(), loc0 },
// what about named args and optional args?
// Error 284 An expression tree may not contain a call or invocation that uses optional arguments X:\jsc.svn\examples\javascript\LINQ\test\SelectToUpperIntoNewExpression\SelectToUpperIntoNewExpression\ApplicationWebService.cs 49 38 SelectToUpperIntoNewExpression
// why not? roslyn fix it :D
// Error 279 An expression tree may not contain a named argument specification X:\jsc.svn\examples\javascript\LINQ\test\SelectToUpperIntoNewExpression\SelectToUpperIntoNewExpression\ApplicationWebService.cs 52 38 SelectToUpperIntoNewExpression
datagroup4 = new data(ss.Tag, "goo2"),
// after we moved from member names to index, what does it take to do arrays?
datagroup5 = new[] { ss.connectStart, ss.connectEnd },
xlower = ss.Tag.ToLower(),
x = ss.Tag.ToUpper()
};
// ToDataTable?
var zzz = z.AsDataTable();
var zz = z.FirstOrDefault();
Debugger.Break();
}