本文整理汇总了C#中Core类的典型用法代码示例。如果您正苦于以下问题:C# Core类的具体用法?C# Core怎么用?C# Core使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Core类属于命名空间,在下文中一共展示了Core类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IntegerSlider
public IntegerSlider(Core.VplControl hostCanvas)
: base(hostCanvas)
{
AddOutputPortToNode("Number", typeof(int));
SliderExpanderInteger expander = new SliderExpanderInteger
{
Style = hostCanvas.FindResource("ExpanderSliderStyleInteger") as Style,
SliderValue = 5,
SliderMax = 10,
SliderMin = 0,
SliderStep = 1
};
var b2 = new Binding("Data")
{
Mode = BindingMode.OneWayToSource,
Source = OutputPorts[0]
};
expander.SetBinding(SliderExpanderInteger.SliderValueProperty, b2);
Name = "Integer slider";
AddControlToNode(expander);
}
示例2: Write
protected override async void Write(Core.LogEventInfo logEvent)
{
var request = (HttpWebRequest) WebRequest.Create(ServerUrl);
request.ContentType = "application/json; charset=utf-8";
request.Method = "POST";
var requestWriter = new StreamWriter(request.GetRequestStream());
requestWriter.Write("{ "
+ "\"version\": " + "\"" + "1.0" + "\",\n"
+ "\"host\": " + "\"" + AndroidId + "\",\n"
+ "\"short_message\": " + "\"" + logEvent.FormattedMessage + "\",\n"
+ "\"full_message\": " + "\"" + logEvent.FormattedMessage + "\",\n"
+ "\"timestamp\": " + "\"" + DateTime.Now.ToString(CultureInfo.InvariantCulture) +
"\",\n"
+ "\"level\": " + "\"" +
logEvent.Level.Ordinal.ToString(CultureInfo.InvariantCulture) + "\",\n"
+ "\"facility\": " + "\"" + "NLog Android Test" + "\",\n"
+ "\"file\": " + "\"" + Environment.CurrentDirectory + "AndroidApp" + "\",\n"
+ "\"line\": " + "\"" + "123" + "\",\n"
+ "\"Userdefinedfields\": " + "{}" + "\n"
+ "}");
requestWriter.Close();
LastResponseMessage = (HttpWebResponse) request.GetResponse();
}
示例3: BuildAssocIdentifier
public static ProtoCore.AST.AssociativeAST.IdentifierNode BuildAssocIdentifier(Core core, string name, ProtoCore.PrimitiveType type = ProtoCore.PrimitiveType.kTypeVar)
{
var ident = new ProtoCore.AST.AssociativeAST.IdentifierNode();
ident.Name = ident.Value = name;
ident.datatype = TypeSystem.BuildPrimitiveTypeObject(type, 0);
return ident;
}
示例4: DiscoverOptions
/// <summary>
/// Builds up a set of options the control can use (i.e. jQuery UI control supports). Which is
/// then used in rendering the JavaScript required to initialise the control properties.
/// </summary>
/// <param name="options">Collection to add the identified options to</param>
override protected internal void DiscoverOptions(Core.ScriptOptions options) {
if (this.Disabled) {
// BUG: There seems to be a bug in jQuery UI meaning disabling all the tabs
// doesn't work, so disable each tab manually. The overall "disabled" flag
// is kept as false so we use the List<int> entry point instead.
this.DisabledArray.Clear();
for (int i=0; i < this.Tabs._Panes._Panes.Count(); i++) {
this.DisabledArray.Add(i);
}
// Following line is left here for when the jQuery UI library is fixed.
//options.Add(this.Disabled, "disable", this.Disabled.JsBool());
}
if (this.DisabledArray != null && this.DisabledArray.Count() > 0) {
options.Add("disabled", this.DisabledArray.JsArray());
}
options.Add(!this.IsNullOrEmpty(this.Fx), "fx", this.Fx);
options.Add(!this.IsNullEmptyOrDefault(this.Evt, DEFAULT_EVENT), "event", this.Evt.InDoubleQuotes());
options.Add(this.Cache, "cache", this.Cache.JsBool() );
options.Add(!this.IsNullOrEmpty(this.AjaxOptions), "ajaxOptions", this.AjaxOptions);
options.Add(this.Collapsible, "collapsible", this.Collapsible.JsBool() );
// Cookie is a little bit different because it's an object, so just add it's options in
options.Add(this.Cookie.Options.GetCookieScriptOption());
options.Add(!this.IsNullEmptyOrDefault(this.IdPrefix, DEFAULT_ID_PREFIX), "idPrefix", this.IdPrefix.InDoubleQuotes());
options.Add(!this.IsNullEmptyOrDefault(this.PanelTemplate, DEFAULT_PANEL_TEMPLATE), "panelTemplate", this.PanelTemplate.InDoubleQuotes());
options.Add(!this.IsNullEmptyOrDefault(this.Spinner, DEFAULT_SPINNER), "spinner", this.Spinner.InDoubleQuotes());
options.Add(!this.IsNullEmptyOrDefault(this.TabTemplate, DEFAULT_TAB_TEMPLATE), "tabTemplate", this.TabTemplate.InDoubleQuotes());
if (this.Tabs.Panes.HasSelectedTab() && this.Tabs.Panes.GetSelectedTab().Index > 0) {
options.Add( this.Tabs.Panes.HasSelectedTab(), "selected", this.Tabs.Panes.GetSelectedTab().Index.ToString() );
}
}
示例5: MessageReceivedEventArgs
public MessageReceivedEventArgs(Core.JabberConnection objConnection, Users.JabberContact objContact,
string strSubject, string strBody)
: base(objConnection, objContact)
{
Subject = strSubject;
Body = strBody;
}
示例6: Delete
public void Delete(Core.Business.MiniBlogComment miniBlogComment)
{
SqlServerUtility sql = new SqlServerUtility(connectionString);
sql.AddParameter("@Id", SqlDbType.BigInt, miniBlogComment.Id);
sql.ExecuteSP("USP_MiniBlogComment_Delete_By_Id");
}
示例7: CompareString
public static int CompareString(StackValue s1, StackValue s2, Core core)
{
if (!StackUtils.IsString(s1) || !StackUtils.IsString(s2))
{
return ProtoCore.DSASM.Constants.kInvalidIndex;
}
HeapElement he1 = ArrayUtils.GetHeapElement(s1, core);
HeapElement he2 = ArrayUtils.GetHeapElement(s2, core);
int len1 = he1.VisibleSize;
int len2 = he2.VisibleSize;
int len = len1 > len2 ? len2 : len1;
int i = 0;
for (; i < len; ++i)
{
if (he1.Stack[i].opdata != he2.Stack[i].opdata)
{
return (he1.Stack[i].opdata > he2.Stack[i].opdata) ? 1 : -1;
}
}
if (len1 > len2)
return 1;
else if (len1 == len2)
return 0;
else
return -1;
}
示例8: GenerateCollectionLinks
/// <summary>
/// Generates the Footprint Links for each aggregate, when a collection
/// of aggregates are being returned
/// </summary>
/// <param name="aggregate">The aggregate for which the links are generated</param>
/// <returns>Collection of links</returns>
public IEnumerable<Models.Link> GenerateCollectionLinks(Core.Model.Aggregate aggregate)
{
var links = new List<Link>()
{
new Link()
{
Href = "/api/turbine/" + aggregate.Id,
Rel = "self",
Title = string.Empty,
Type = "method=\"GET\""
},
new Link()
{
Href = "/api/windfarm/" + aggregate.Id + "/turbine/",
Rel = "windfarm turbines",
Title = string.Empty,
Type = "method=\"GET\""
},
new Link()
{
Href = "/api/windfarm/" + aggregate.Id,
Rel = "windfarm",
Title = string.Empty,
Type = "method=\"GET\""
}
};
return links;
}
示例9: Delete
public void Delete(Core.Business.UserAnswer userAnswer)
{
SqlServerUtility sql = new SqlServerUtility();
sql.AddParameter("@Key", SqlDbType.Int, userAnswer.Id);
sql.ExecuteSql(SqlDeleteUserAnswer);
}
示例10: Delete
public void Delete(Core.Business.JointReviewSecondAudit jointReviewSecondAudit)
{
SqlServerUtility sql = new SqlServerUtility();
sql.AddParameter("@Id", SqlDbType.UniqueIdentifier, jointReviewSecondAudit.Id);
sql.ExecuteSP("usp_DeleteJointReviewSecondAudit");
}
示例11: Suggest
public Suggest(Request request, Core.Client.UrlBuilder urlBuilder)
: base(request, urlBuilder)
{
log.Debug("Initialize new Suggest adapter.");
Request.Action = RequestType.Suggest;
}
示例12: GrabFrom
//mengambil gambar dari kamera
void GrabFrom(Core.BuildingBlocks.FrameGrabber fg)
{
if (fg != null)
{
fg.OnFrame += new Parsley.Core.BuildingBlocks.FrameGrabber.OnFrameHandler(_grabber_OnFrame);
}
}
示例13: Delete
public void Delete(Core.Business.ObjectStimulatedType objectStimulatedType)
{
SqlServerUtility sql = new SqlServerUtility();
sql.AddParameter("@Id", SqlDbType.Int, objectStimulatedType.Id);
sql.ExecuteSP("usp_DeleteObjectStimulatedType");
}
示例14: Delete
public void Delete(Core.Business.Subsidies subsidies)
{
SqlServerUtility sql = new SqlServerUtility();
sql.AddParameter("@Id", SqlDbType.UniqueIdentifier, subsidies.Id);
sql.ExecuteSP("usp_DeleteSubsidy");
}
示例15: Delete
public void Delete(Core.Business.SysSetting sysSetting)
{
SqlServerUtility sql = new SqlServerUtility();
sql.AddParameter("@Id", SqlDbType.UniqueIdentifier, sysSetting.Id);
sql.ExecuteSP("usp_DeleteSysSetting");
}