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

C# Name类代码示例

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

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



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

示例1: CtorParametersAreInitialized

 public void CtorParametersAreInitialized(IFixture fixture, Name name)
 {
     fixture.Inject<IParameter>(new ParameterTest());
     fixture.Inject<ParameterMeta>(ParameterMeta.Create<IParameter>(name));
     var assertion = new ConstructorInitializedMemberAssertion(fixture);
     assertion.Verify(typeof(CmdApplicationConfiguration));
 }
开发者ID:rahulpnath,项目名称:clal,代码行数:7,代码来源:CmdApplicationConfigurationTest.cs


示例2: NullForCtorArgumentsThrowsException

 public void NullForCtorArgumentsThrowsException(IFixture fixture, Name name)
 {
     fixture.Inject<IParameter>(new ParameterTest());
     fixture.Inject<ParameterMeta>(ParameterMeta.Create<IParameter>(name));
     var assertion = new GuardClauseAssertion(fixture);
     assertion.Verify(typeof(CmdApplicationConfiguration).GetConstructors());
 }
开发者ID:rahulpnath,项目名称:clal,代码行数:7,代码来源:CmdApplicationConfigurationTest.cs


示例3: FormalTypeParam

		public FormalTypeParam(Position position, Name name, object defaultType, List<CustomAttribute> attributes)
			: base(position)
		{
			this.name = name;
			this.defaultType = defaultType;
			this.attributes = new CustomAttributes(attributes);
		}
开发者ID:Ashod,项目名称:Phalanger,代码行数:7,代码来源:TypeDecl.cs


示例4: GetTerms

        public static IEnumerable<Pair<Name, Name>> GetTerms(Name n1, Name n2, bool allowPartial)
        {
            if (!(allowPartial || n1.NumberOfTerms == n2.NumberOfTerms))
                return null;

            return n1.GetTerms().Zip(n2.GetTerms(), Tuples.Create);
        }
开发者ID:GAIPS-INESC-ID,项目名称:FAtiMA-Toolkit,代码行数:7,代码来源:Unifier.cs


示例5: Expectation

			public Expectation(Name expectedName, LeafIndex expectedLeafIndex)
			{
				Contract.Requires(expectedName != null);

				ExpectedName = expectedName;
				ExpectedLeafIndex = expectedLeafIndex;
			}
开发者ID:JeroenBos,项目名称:ASDE,代码行数:7,代码来源:NameBindingTests.cs


示例6: SwapPerspective

 public override BaseEvent SwapPerspective(Name oldPerspective, Name newPerspective)
 {
     Property = Property.SwapTerms(oldPerspective, newPerspective);
     NewValue = NewValue.SwapTerms(oldPerspective, newPerspective);
     base.SwapPerspective(oldPerspective, newPerspective);
     return this;
 }
开发者ID:GAIPS-INESC-ID,项目名称:FAtiMA-Toolkit,代码行数:7,代码来源:PropertyChangeEvent.cs


示例7: SwapPerspective

 public override BaseEvent SwapPerspective(Name oldPerspective, Name newPerspective)
 {
     Action = Action.SwapTerms(oldPerspective, newPerspective);
     Target = Target.SwapTerms(oldPerspective, newPerspective);
     base.SwapPerspective(oldPerspective, newPerspective);
     return this;
 }
开发者ID:GAIPS-INESC-ID,项目名称:FAtiMA-Toolkit,代码行数:7,代码来源:ActionEvent.cs


示例8: Be_Able_To_Parse_A_Given_Line_To_A_Name_Model

        public void Be_Able_To_Parse_A_Given_Line_To_A_Name_Model()
        {
            var expected = new Name
            {
                MutKod = MutKod.RecordNotChanged,
                NmNr = 2,
                NmMemo = "ABBOI2",
                NmEtiket = "ABBOKINASE 250.000IE INJPDR",
                NmNm40 = "ABBOKINASE",
                NmNaam = "ABBOKINASE INJECTIEPOEDER FLACON 250.000IE"
            };

            const string data =
                @"002000000002ABBOI2ABBOKINASE 250.000IE INJPDRABBOKINASE                              ABBOKINASE INJECTIEPOEDER FLACON 250.000IE        0000000000000000000000000";

            byte[] dataBytes = Encoding.UTF8.GetBytes(data);
            var memoryStream = new MemoryStream(dataBytes);
            var serializer = new GStandardFileSerializer<Name>();
            var lines = serializer.ReadLines(memoryStream);

            var model = lines.FirstOrDefault();
            Assert.IsNotNull(model);
            Assert.AreEqual(expected.MutKod, model.MutKod);
            Assert.AreEqual(expected.NmEtiket, model.NmEtiket);
            Assert.AreEqual(expected.NmMemo, model.NmMemo);
            Assert.AreEqual(expected.NmNaam, model.NmNaam);
            Assert.AreEqual(expected.NmNm40, model.NmNm40);
            Assert.AreEqual(expected.NmNr, model.NmNr);
        }
开发者ID:rdvanbuuren,项目名称:GenImport,代码行数:29,代码来源:NameFileSerializerShould.cs


示例9: AppraisalRule

 public AppraisalRule(Name eventName, ConditionSet conditions = null)
 {
     m_id = Guid.NewGuid();
     EventName = eventName;
     Conditions = conditions ?? new ConditionSet();
     Desirability = Praiseworthiness = 0;
 }
开发者ID:GAIPS-INESC-ID,项目名称:FAtiMA-Toolkit,代码行数:7,代码来源:AppraisalRule.cs


示例10: getBrush

		public static Brush getBrush(Name name, int num = 4)
		{
			var converter = new System.Windows.Media.BrushConverter();

			switch(name)
			{
				case Name.Red:			return (Brush)converter.ConvertFromString(RED[num]);
				case Name.Pink:			return (Brush)converter.ConvertFromString(PINK[num]);
				case Name.Purple:		return (Brush)converter.ConvertFromString(PURPLE[num]);
				case Name.DeepPurple:	return (Brush)converter.ConvertFromString(DEEP_PURPLE[num]);
				case Name.Indigo:		return (Brush)converter.ConvertFromString(INDIGO[num]);
				case Name.Blue:			return (Brush)converter.ConvertFromString(BLUE[num]);
				case Name.LightBlue:	return (Brush)converter.ConvertFromString(LIGHT_BLUE[num]);
				case Name.Cyan:			return (Brush)converter.ConvertFromString(CYAN[num]);
				case Name.Teal:			return (Brush)converter.ConvertFromString(TEAL[num]);
				case Name.Green:		return (Brush)converter.ConvertFromString(GREEN[num]);
				case Name.LightGreen:	return (Brush)converter.ConvertFromString(LIGHT_GREEN[num]);
				case Name.Lime:			return (Brush)converter.ConvertFromString(LIME[num]);
				case Name.Yellow:		return (Brush)converter.ConvertFromString(YELLOW[num]);
				case Name.Amber:		return (Brush)converter.ConvertFromString(AMBER[num]);
				case Name.Orange:		return (Brush)converter.ConvertFromString(ORANGE[num]);
				case Name.DeepOrange:	return (Brush)converter.ConvertFromString(DEEP_ORANGE[num]);
				case Name.Brown:		return (Brush)converter.ConvertFromString(BROWN[num]);
				case Name.Grey:			return (Brush)converter.ConvertFromString(GREY[num]);
				case Name.BlueGrey:		return (Brush)converter.ConvertFromString(BLUE_GREY[num]);
				case Name.Black:		return (Brush)converter.ConvertFromString("#FF000000");
			}

			return (Brush)converter.ConvertFromString("#FFFFFFFF");
		}
开发者ID:jelee9,项目名称:wsr_pos_vs,代码行数:30,代码来源:MetrialColor.cs


示例11: Two_objects_with_the_same_names_should_be_equal

        public void Two_objects_with_the_same_names_should_be_equal(string lastName, string firstName)
        {
            var nameInstanceOne = new Name(lastName, firstName);
            var nameInstanceTwo = new Name(lastName, firstName);

            Assert.Equal(nameInstanceOne, nameInstanceTwo);
        }
开发者ID:Vidarls,项目名称:functionalEscape-Fsharp101,代码行数:7,代码来源:ValueObjectTests.cs


示例12: NodeStatusRequest

		internal NodeStatusRequest(Name name)
		{
			QuestionName = name;
			QuestionType = Nbstat;
			IsRecurDesired = false;
			IsBroadcast = false;
		}
开发者ID:Cyber-Forensic,项目名称:Potato,代码行数:7,代码来源:NodeStatusRequest.cs


示例13: WriteQuestion

 public void WriteQuestion(Name name, RecordType qtype, RecordClass qclass = RecordClass.Internet)
 {
     WriteName(name);
     WriteUInt16((ushort)qtype);
     WriteUInt16((ushort)qclass);
     _questionCount++;
 }
开发者ID:joltmode,项目名称:Tmds.MDns,代码行数:7,代码来源:DnsMessageWriter.cs


示例14: Main

 /* Also illustrates some String methods.
 */
 public static void Main()
 {
     Name aName = new Name("Henry", "Johnson");
     Address anAddress =
     new Address("1512 Harbor Blvd.", "Long Beach",
                         "CA", "99919");
     Console.Write("Enter an id string: ");
     String anId = Console.ReadLine();
     Person aPerson = new Person(anId,aName,anAddress);
     Console.WriteLine("Our person is ");
     Console.WriteLine(aPerson);
     Console.WriteLine("   with id {0}", aPerson.GetId());
     Console.WriteLine
        ("\n And now some tests using string methods");
     String address = anAddress.ToString();
     int i = address.IndexOf("Harbor");
     Console.WriteLine
        ("The index of Harbor in address is {0}", i);
     String z1 = "99919";
     int lenth = address.Length;
     Console.WriteLine("The length of address is {0}", l);
     String z2 = address.Substring(lenth-5,5);
     bool same = z2.Equals(z1);
     Console.WriteLine
         ("These two zip codes are the same? {0}", same);
     int less = z1.CompareTo("Harbor");
     Console.WriteLine("Compare returns {0}", less);
     String hat = "   hat   ";
     Console.WriteLine(hat+"rack");
     Console.WriteLine(hat.Trim() + "rack");
 }
开发者ID:JnS-Software-LLC,项目名称:CSC153,代码行数:33,代码来源:TestPerson.cs


示例15: GetNameByEnum

 private string GetNameByEnum(Name name)
 {
     string result;
     switch (name)
     {
         case Name.DCS:
             result = "DCS";
             break;
         case Name.班次:
             result = "班次";
             break;
         case Name.报警周期:
             result = "报警周期";
             break;
         case Name.电表:
             result = "电表";
             break;
         case Name.峰谷平:
             result = "峰谷平";
             break;
         case Name.公共公式:
             result = "公共公式";
             break;
         case Name.公式:
             result = "公式";
             break;
         case Name.水泥品种:
             result = "水泥品种";
             break;
         default:
             result = "";
             break;
     }
     return result;
 }
开发者ID:nxjcproject,项目名称:xitongcanshu,代码行数:35,代码来源:UpdateParameters.cs


示例16: SutWithSameValuesAreEqual

 public void SutWithSameValuesAreEqual(Name name)
 {
     var aParameter = new NameOnlyParameter(name);
     var anotherParameter = new NameOnlyParameter(name);
     Assert.Equal(aParameter, anotherParameter);
     Assert.Equal(aParameter.GetHashCode(), anotherParameter.GetHashCode());
 }
开发者ID:rahulpnath,项目名称:clal,代码行数:7,代码来源:NameOnlyParameterTest.cs


示例17: FixedSchema

 private FixedSchema(Name name, int size, Names names)
     : base(Type.FIXED, name, names)
 {
     if (size <= 0) throw new ArgumentOutOfRangeException("size", "size must be greater than zero.");
     
     this.size = size;
 }
开发者ID:thirumg,项目名称:Avro.NET,代码行数:7,代码来源:FixedSchema.cs


示例18: SecurityKey

 /// <summary>
 /// constructor accepting a string for the key
 /// </summary>
 /// <param name="type"></param>
 /// <param name="name"></param>
 /// <param name="keyString"></param>
 public SecurityKey(Type type, Name name, string keyString)
 {
     KeyBytes = Util.StringToByteArray(keyString);
     KeyString = keyString;
     KeyName = name;
     KeyType = type;
 }
开发者ID:anica87,项目名称:Darwin,代码行数:13,代码来源:SecurityKey.cs


示例19: Program

 public Program()
 {
     names[0] = new Name("Joe", "Mayo");
     names[1] = new Name("John", "Hancock");
     names[2] = new Name("Jane", "Doe");
     names[3] = new Name("John", "Doe");
     names[4] = new Name("Jack", "Smith");
 }
开发者ID:Kristijan10048,项目名称:diplomska,代码行数:8,代码来源:Program.cs


示例20: Equals

        public bool Equals(Name other)
        {
            if (other == null) return false;

            if (ReferenceEquals(this, other)) return true;

            return other.FirstName == FirstName && other.LastName == LastName;
        }
开发者ID:brianium,项目名称:today,代码行数:8,代码来源:Name.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# NameCase类代码示例发布时间:2022-05-24
下一篇:
C# NWriter类代码示例发布时间: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