当前位置: 首页>>代码示例>>C#>>正文


C# Core类代码示例

本文整理汇总了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);
        }
开发者ID:aquarius20th,项目名称:CSharp_TUM.CMS.VPLControl,代码行数:25,代码来源:IntegerSlider.cs

示例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();
        }
开发者ID:unhappy224,项目名称:NLog.IqMetrix,代码行数:27,代码来源:LumberMillTarget.cs

示例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;
 }
开发者ID:RobertiF,项目名称:Dynamo,代码行数:7,代码来源:CoreUtils.cs

示例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() );
			}
		}
开发者ID:xuanvu,项目名称:Fluqi,代码行数:35,代码来源:Options-Core.cs

示例5: MessageReceivedEventArgs

        public MessageReceivedEventArgs(Core.JabberConnection objConnection, Users.JabberContact objContact, 
																		string strSubject, string strBody)
            : base(objConnection, objContact)
        {
            Subject = strSubject;
            Body = strBody;
        }
开发者ID:jbautistam,项目名称:BauXmppMessenger,代码行数:7,代码来源:MessageReceivedEventArgs.cs

示例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");
        }
开发者ID:dalinhuang,项目名称:ume-v3,代码行数:7,代码来源:MiniBlogCommentProvider.cs

示例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;
        }
开发者ID:samuto,项目名称:designscript,代码行数:30,代码来源:StringUtils.cs

示例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;
 }
开发者ID:TimHarrison1260,项目名称:Dissertation,代码行数:34,代码来源:TurbineLinkGenerator.cs

示例9: Delete

        public void Delete(Core.Business.UserAnswer userAnswer)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@Key", SqlDbType.Int, userAnswer.Id);
            sql.ExecuteSql(SqlDeleteUserAnswer);
        }
开发者ID:dalinhuang,项目名称:cy-csts,代码行数:7,代码来源:UserAnswerProvider.cs

示例10: Delete

        public void Delete(Core.Business.JointReviewSecondAudit jointReviewSecondAudit)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@Id", SqlDbType.UniqueIdentifier, jointReviewSecondAudit.Id);
            sql.ExecuteSP("usp_DeleteJointReviewSecondAudit");
        }
开发者ID:dalinhuang,项目名称:cy-csts,代码行数:7,代码来源:JointReviewSecondAuditProvider.cs

示例11: Suggest

        public Suggest(Request request, Core.Client.UrlBuilder urlBuilder)
            : base(request, urlBuilder)
        {
            log.Debug("Initialize new Suggest adapter.");

            Request.Action = RequestType.Suggest;
        }
开发者ID:FACT-Finder,项目名称:FACT-Finder-.NET-Library,代码行数:7,代码来源:Suggest.cs

示例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);
   }
 }
开发者ID:sivarajankumar,项目名称:dentalsmile,代码行数:8,代码来源:EmbeddableStream.cs

示例13: Delete

        public void Delete(Core.Business.ObjectStimulatedType objectStimulatedType)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@Id", SqlDbType.Int, objectStimulatedType.Id);
            sql.ExecuteSP("usp_DeleteObjectStimulatedType");
        }
开发者ID:dalinhuang,项目名称:cy-csts,代码行数:7,代码来源:ObjectStimulatedTypeProvider.cs

示例14: Delete

        public void Delete(Core.Business.Subsidies subsidies)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@Id", SqlDbType.UniqueIdentifier, subsidies.Id);
            sql.ExecuteSP("usp_DeleteSubsidy");
        }
开发者ID:dalinhuang,项目名称:cy-csts,代码行数:7,代码来源:SubsidiesProvider.cs

示例15: Delete

        public void Delete(Core.Business.SysSetting sysSetting)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@Id", SqlDbType.UniqueIdentifier, sysSetting.Id);
            sql.ExecuteSP("usp_DeleteSysSetting");
        }
开发者ID:dalinhuang,项目名称:cy-csts,代码行数:7,代码来源:SysSettingProvider.cs


注:本文中的Core类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。