• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Core类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Core的典型用法代码示例。如果您正苦于以下问题:C# Core类的具体用法?C# Core怎么用?C# Core使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Core类属于命名空间,在下文中一共展示了Core类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: Delete

        public void Delete(Core.Business.InstrumentPictureRepository instrumentPictureRepository)
        {
            SqlServerUtility sql = new SqlServerUtility();

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


示例17: DoubleSlider

        public DoubleSlider(Core.VplControl hostCanvas)
            : base(hostCanvas)
        {
            AddOutputPortToNode("Number", typeof(double));

            SliderExpanderDouble expander = new SliderExpanderDouble
            {
                Style = hostCanvas.FindResource("ExpanderSliderStyleDouble") as Style,
                SliderValue = 5,
                SliderMax = 10,
                SliderMin = 2,
                SliderStep = 0.01
            };

            var b2 = new Binding("Data")
            {
                Mode = BindingMode.OneWayToSource,
                Source = OutputPorts[0]
            };
            expander.SetBinding(SliderExpanderDouble.SliderValueProperty, b2);

            Name = "Double slider";

            AddControlToNode(expander);
        }
开发者ID:aquarius20th,项目名称:CSharp_TUM.CMS.VPLControl,代码行数:25,代码来源:DoubleSlider.cs


示例18: Delete

        public void Delete(Core.Business.FavoritesComment favoritesComment)
        {
            SqlServerUtility sql = new SqlServerUtility(connectionString);

            sql.AddParameter("@Id", SqlDbType.BigInt, favoritesComment.Id);
            sql.ExecuteSqlReader(SqlDeleteFavoritesComment);
        }
开发者ID:dalinhuang,项目名称:ume-v3,代码行数:7,代码来源:FavoritesCommentProvider.cs


示例19: InsertBinaryOperationMethod

    private static void InsertBinaryOperationMethod(Core core, ProtoCore.AST.Node root, Operator op, PrimitiveType r, PrimitiveType op1, PrimitiveType op2, int retRank = 0, int op1rank = 0, int op2rank = 0)
    {
        ProtoCore.AST.AssociativeAST.FunctionDefinitionNode funcDefNode = new ProtoCore.AST.AssociativeAST.FunctionDefinitionNode();
        funcDefNode.access = ProtoCore.DSASM.AccessSpecifier.kPublic;
        funcDefNode.IsAssocOperator = true;
        funcDefNode.IsBuiltIn = true;
        funcDefNode.Name = Op.GetOpFunction(op);
        funcDefNode.ReturnType = new ProtoCore.Type() { Name = core.TypeSystem.GetType((int)r), UID = (int)r, rank = retRank};
        ProtoCore.AST.AssociativeAST.ArgumentSignatureNode args = new ProtoCore.AST.AssociativeAST.ArgumentSignatureNode();
        args.AddArgument(new ProtoCore.AST.AssociativeAST.VarDeclNode()
        {
            memregion = ProtoCore.DSASM.MemoryRegion.kMemStack,
            access = ProtoCore.DSASM.AccessSpecifier.kPublic,
            NameNode = BuildAssocIdentifier(core, ProtoCore.DSASM.Constants.kLHS),
            ArgumentType = new ProtoCore.Type { Name = core.TypeSystem.GetType((int)op1), UID = (int)op1, rank = op1rank}
        });
        args.AddArgument(new ProtoCore.AST.AssociativeAST.VarDeclNode()
        {
            memregion = ProtoCore.DSASM.MemoryRegion.kMemStack,
            access = ProtoCore.DSASM.AccessSpecifier.kPublic,
            NameNode = BuildAssocIdentifier(core, ProtoCore.DSASM.Constants.kRHS),
            ArgumentType = new ProtoCore.Type { Name = core.TypeSystem.GetType((int)op2), UID = (int)op2, rank = op2rank}
        });
        funcDefNode.Signature = args;

        ProtoCore.AST.AssociativeAST.CodeBlockNode body = new ProtoCore.AST.AssociativeAST.CodeBlockNode();
        ProtoCore.AST.AssociativeAST.IdentifierNode _return = BuildAssocIdentifier(core, ProtoCore.DSDefinitions.Keyword.Return, ProtoCore.PrimitiveType.kTypeReturn);

        ProtoCore.AST.AssociativeAST.IdentifierNode lhs = BuildAssocIdentifier(core, ProtoCore.DSASM.Constants.kLHS);
        ProtoCore.AST.AssociativeAST.IdentifierNode rhs = BuildAssocIdentifier(core, ProtoCore.DSASM.Constants.kRHS);
        body.Body.Add(new ProtoCore.AST.AssociativeAST.BinaryExpressionNode() { LeftNode = _return, Optr = ProtoCore.DSASM.Operator.assign, RightNode = new ProtoCore.AST.AssociativeAST.BinaryExpressionNode() { LeftNode = lhs, RightNode = rhs, Optr = op } });
        funcDefNode.FunctionBody = body;
        (root as ProtoCore.AST.AssociativeAST.CodeBlockNode).Body.Add(funcDefNode);
    }
开发者ID:RobertiF,项目名称:Dynamo,代码行数:34,代码来源:CoreUtils.cs


示例20: Delete

        public void Delete(Core.Business.Messages messages)
        {
            SqlServerUtility sql = new SqlServerUtility(connectionString);

            sql.AddParameter("@Id", SqlDbType.BigInt, messages.Id);
            sql.ExecuteSql(SqlDeleteMessages);
        }
开发者ID:dalinhuang,项目名称:ume-v3,代码行数:7,代码来源:MessagesProvider.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# CoreClientParam类代码示例发布时间:2022-05-24
下一篇:
C# CorFrame类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap