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

C# Id类代码示例

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

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



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

示例1: RelayVariations

 public RelayVariations(EventDB eventDB, Id<Course> courseId, int numberTeams, int numberLegs)
 {
     this.eventDB = eventDB;
     this.courseId = courseId;
     this.numberTeams = numberTeams;
     this.numberLegs = numberLegs;
 }
开发者ID:petergolde,项目名称:PurplePen,代码行数:7,代码来源:RelayVariations.cs


示例2: GetImageByGuid

        public byte[] GetImageByGuid(string sGuid)
        {
            Id ID = new Id(sGuid);
            IDocument doc = Factory.Document.FetchInstance(this._ceConn.objectStore, ID, null);

            return null;
        }
开发者ID:xchgdzq233,项目名称:testing,代码行数:7,代码来源:FileNetUtil.cs


示例3: LoadNibResourceNamedOwner

        public static bool LoadNibResourceNamedOwner(this NSBundle bundle, Type type, NSString resourceName, Id owner)
        {
            bool result = false;
            Assembly assembly = type.Assembly;

            using (Stream stream = assembly.GetManifestResourceStream(resourceName))
            {
                if (stream != null)
                {
                    byte[] buffer = new byte[stream.Length];
                    stream.Read(buffer, 0, (int)stream.Length);
                    stream.Close();

                    String fileName = Path.GetTempFileName();
                    File.WriteAllBytes(fileName, buffer);

					NSNib nib = new NSNib(NSURL.URLWithString(fileName));
					NSArray topLevelObjects;
					result = nib.InstantiateNibWithOwnerTopLevelObjects(owner, out topLevelObjects);
					nib.Release();

                    File.Delete(fileName);
                }
            }

            return result;
        }
开发者ID:Monobjc,项目名称:monobjc,代码行数:27,代码来源:NSBundle.Interop.cs


示例4: CourseDesignator

 // Create a course designator for a part
 public CourseDesignator(Id<Course> course, int part)
 {
     Debug.Assert(part >= 0);
     Debug.Assert(course.IsNotNone);
     this.courseId = course;
     this.part = part;
 }
开发者ID:petergolde,项目名称:PurplePen,代码行数:8,代码来源:CourseView.cs


示例5: AddCourseControl

        // Add a new course control to a course. Adds a new CourseControl referencing controlId into courseId. The place to insert is
        // given by courseControl1 and courseControl2. These control should have been gotten by calling FindControlInsertionPoint.
        public static Id<CourseControl> AddCourseControl(EventDB eventDB, Id<ControlPoint> controlId, Id<Course> courseId, Id<CourseControl> courseControl1, Id<CourseControl> courseControl2)
        {
            CourseControl newCourseControl;
            Id<CourseControl> newCourseControlId;

            // When adding a new course controls, they fit into variations fine because we are never adding or changing an split, just
            // fitting into existing splits.

            if (courseControl1.IsNone) {
                // Adding at start.
                Course course = (Course) eventDB.GetCourse(courseId).Clone();
                Debug.Assert(courseControl2 == course.firstCourseControl);
                newCourseControl = new CourseControl(controlId, course.firstCourseControl);
                newCourseControlId = eventDB.AddCourseControl(newCourseControl);
                course.firstCourseControl = newCourseControlId;
                eventDB.ReplaceCourse(courseId, course);
            }
            else {
                // Adding after courseControl1.
                CourseControl before = (CourseControl) eventDB.GetCourseControl(courseControl1).Clone();
                Debug.Assert(courseControl2 == before.nextCourseControl);
                newCourseControl = new CourseControl(controlId, before.nextCourseControl);
                newCourseControlId = eventDB.AddCourseControl(newCourseControl);
                before.nextCourseControl = newCourseControlId;
                eventDB.ReplaceCourseControl(courseControl1, before);
            }

            return newCourseControlId;
        }
开发者ID:petergolde,项目名称:PurplePen,代码行数:31,代码来源:ChangeEvent.cs


示例6: AddDimension

        public void AddDimension(Id conceptId)
        {
            Contract.AssertNotNull(conceptId, "conceptId");

            var dimension = KeyFamily.Dimensions.Find(conceptId);
            dimensions.Add(conceptId, dimension);
        }
开发者ID:dur41d,项目名称:sdmxdotnet,代码行数:7,代码来源:Group.cs


示例7: Hierarchy

 public Hierarchy(Id id, CodeRef root)
     : this(id)
 {
     Contract.AssertNotNull(root, "root");
     
     Root = root;
 }
开发者ID:dur41d,项目名称:sdmxdotnet,代码行数:7,代码来源:Hierarchy.cs


示例8: ComponentsOrderedAccordingToGenericParameterOrder

            public void ComponentsOrderedAccordingToGenericParameterOrder()
            {
                #region Arrange

                var expectedComponent0 = Guid.NewGuid();


                var expectedComponents = new List<Object>
                {
                    expectedComponent0
                };

                var id = new Id<Guid>(
                    expectedComponent0);

                #endregion

                #region Act

                var actualComponents = id;

                #endregion

                #region Assert

                actualComponents.Should().Equal(expectedComponents);

                #endregion
            }
开发者ID:TonightWe,项目名称:TW.UbiquitousId,代码行数:29,代码来源:OneComponentIdTests.cs


示例9: ComponentsOrderedAccordingToGenericParameterOrder

            public void ComponentsOrderedAccordingToGenericParameterOrder()
            {
                #region Arrange

                var expectedComponent0 = Guid.NewGuid();
                var expectedComponent1 = Guid.NewGuid().ToString();
                var expectedComponent2 = DateTime.UtcNow;


                var expectedComponents = new List<Object>
                {
                    expectedComponent0,
                    expectedComponent1,
                    expectedComponent2
                };

                var id = new Id<Guid, String, DateTime>(
                    expectedComponent0,
                    expectedComponent1,
                    expectedComponent2);

                #endregion

                #region Act

                var actualComponents = id;

                #endregion

                #region Assert

                actualComponents.Should().Equal(expectedComponents);

                #endregion
            }
开发者ID:TonightWe,项目名称:TW.UbiquitousId,代码行数:35,代码来源:ThreeComponentIdTests.cs


示例10: Initialize

        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            base.Initialize();

            //System.Reflection.Assembly.GetAssembly().CreateInstance("")
            //// Tile
            //    for (int row = 0; row < 10; row++)
            //    {
            //        for (int column = 0; column < 10; column++)
            //        {
            //            var model = new Model("Models/tile");
            //            //model.Shader = "TCT";
            //            model.Position = new Vector3(row, column, 0);
            //            model.BoundingBox = new BoundingBox(new Vector3(row, 0, column), new Vector3(row*1.0f, 0.1f, row*column));
            //            var quad = new Quad("Textures/Harmony", new Color(((float)row) / 10.0f, ((float)column) / 10.0f, 0));
            //            GameObjectManager.AddGameObject("quad" + row + column, quad);
            //            quad.Position = new Vector3(row, -1.0f, -column);
            //            quad.Shader = "TCT";
            //            quad.Rotation = Quaternion.CreateFromAxisAngle(new Vector3(1, 0, 0), -((float)Math.PI)/2.0f);
            //            quad.Scale = new Vector3(1.0f);

            //            GameObjectManager.AddGameObject("tile" + row + column, model);
            //        }
            //    }

            var model = new Model("Models/tile");
            var id = new Id {Handle = "tile", Guid = GuidManager.NewGuid()};
            ModelManager.AddModel(id, model);

            //var quad = new Quad("Textures/harmony", Color.White);
            //var id = new Id() {Handle = "quad", Guid = GuidManager.NewGuid()};
            //GameObjectManager.AddGameObject(id, quad);
        }
开发者ID:kirlianstudios,项目名称:armada,代码行数:39,代码来源:ArmadaGame.cs


示例11: ComponentsOrderedAccordingToGenericParameterOrder

            public void ComponentsOrderedAccordingToGenericParameterOrder()
            {
                #region Arrange

                var expectedIdStringBuilder = new StringBuilder();
                expectedIdStringBuilder.Append("fe67da762a214fa2b356d9e5da80edfc");
                expectedIdStringBuilder.Append("|helloworld");
                expectedIdStringBuilder.Append("|2342342343234");
                expectedIdStringBuilder.Append("|0");
                expectedIdStringBuilder.Append("|33");
                expectedIdStringBuilder.Append("|a4bac0922c674c1b80016b680e31ba44");
                var expectedIdString = expectedIdStringBuilder.ToString();

                var id = new Id<Guid, String, DateTime, DayOfWeek,int,Guid>(expectedIdString);

                #endregion

                #region Act

                var actualIdString = id.ToString();

                #endregion

                #region Assert

                actualIdString.ShouldBeEquivalentTo(expectedIdString);

                #endregion
            }
开发者ID:TonightWe,项目名称:TW.UbiquitousId,代码行数:29,代码来源:SixComponentIdTests.cs


示例12: PanelDirectoryDidChange

 public void PanelDirectoryDidChange(Id sender, NSString path)
 {
     if (this.soundOnCheck.State > 0)
     {
         NSSound.SoundNamed("Frog").Play();
     }
 }
开发者ID:Monobjc,项目名称:monobjc-samples,代码行数:7,代码来源:MyDocument.cs


示例13: WriteXml

        public void WriteXml(string filename, RelayVariations relayVariations, EventDB eventDB, Id<Course> courseId)
        {
            this.relayVariations = relayVariations;
            this.eventDB = eventDB;
            this.courseId = courseId;
            this.modificationDate = DateTimeOffset.Now;
            this.courseName = eventDB.GetCourse(courseId).name;

            // Create the XML writer.
            XmlWriterSettings settings = new XmlWriterSettings();
            settings.Indent = true;
            settings.Encoding = new UTF8Encoding(false);
            xmlWriter = XmlWriter.Create(filename, settings);

            WriteStart();

            for (int teamNumber = 1; teamNumber < relayVariations.NumberOfTeams; ++teamNumber) {
                WriteTeam(teamNumber);
            }

            WriteEnd();

            // And done.
            xmlWriter.Close();
            eventDB = null;
            xmlWriter = null;
        }
开发者ID:petergolde,项目名称:PurplePen,代码行数:27,代码来源:ExportXml.cs


示例14: SelectVariations

        public SelectVariations(EventDB eventDB, Id<Course> courseId)
        {
            InitializeComponent();

            this.eventDB = eventDB;
            this.courseId = courseId;

            Course course = eventDB.GetCourse(courseId);
            if (course.relayTeams > 0)
                lastTeam = course.relayTeams;
            else
                lastTeam = null;

            comboBoxVariations.SelectedIndex = 0;
            if (lastTeam.HasValue) {
                upDownFirstTeam.Maximum = upDownLastTeam.Maximum = lastTeam.Value;
                upDownFirstTeam.Minimum = upDownLastTeam.Minimum = 1;
                upDownFirstTeam.Value = 1;
                upDownLastTeam.Value = lastTeam.Value;

                labelNumberOfTeams.Text = string.Format(labelNumberOfTeams.Text, lastTeam.Value);
            }

            UpdateControls();
        }
开发者ID:petergolde,项目名称:PurplePen,代码行数:25,代码来源:SelectVariations.cs


示例15: CreateTextForControl

        /// <summary>
        /// Create the text version of a particular control point.
        /// The distanceText parameter is used for finish, marked route end,
        /// and other similar features, and be the distance, already rounded with "m" suffix. Use "" if none.
        /// Custom text for the control or for symbols are taken into account.
        /// </summary>
        public string CreateTextForControl(Id<ControlPoint> controlId, string distanceText)
        {
            ControlPoint controlPoint = eventDB.GetControl(controlId);

            // If there is custom text, just return it.
            if (!string.IsNullOrEmpty(controlPoint.descriptionText))
                return controlPoint.descriptionText;

            string text;

            switch (controlPoint.kind) {
                case ControlPointKind.Normal:
                    text = CreateTextForNormalControl(controlPoint);
                    break;

                case ControlPointKind.Start:
                case ControlPointKind.MapExchange:
                    text = CreateTextForStartControl(controlPoint);
                    break;

                case ControlPointKind.Finish:
                case ControlPointKind.CrossingPoint:
                    text = CreateTextForDirective(controlPoint.symbolIds[0], distanceText);
                    break;

                default:
                    Debug.Fail("bad control point kind"); text = ""; break;
            }

            return CapitalizeFirstLetter(text);
        }
开发者ID:petergolde,项目名称:PurplePen,代码行数:37,代码来源:Textifier.cs


示例16: ComponentsOrderedAccordingToGenericParameterOrder

            public void ComponentsOrderedAccordingToGenericParameterOrder()
            {
                #region Arrange

                var expectedComponent0 = Guid.NewGuid();
                var expectedComponent1 = Guid.NewGuid().ToString();
                var expectedComponent2 = DateTime.UtcNow;
                const DayOfWeek expectedComponent3 = DayOfWeek.Friday;
                var expectedComponent4 = DateTime.MinValue;
                var expectedComponent5 = Guid.NewGuid();
                const DayOfWeek expectedComponent6 = DayOfWeek.Sunday;
                var expectedComponent7 = Guid.NewGuid().ToString();
                var expectedComponent8 = DateTime.MaxValue;
                const DateTimeKind expectedComponent9 = DateTimeKind.Utc;
                var expectedComponent10 = DateTime.Today.ToString();


                var expectedComponents = new List<Object>
                {
                    expectedComponent0,
                    expectedComponent1,
                    expectedComponent2,
                    expectedComponent3,
                    expectedComponent4,
                    expectedComponent5,
                    expectedComponent6,
                    expectedComponent7,
                    expectedComponent8,
                    expectedComponent9,
                    expectedComponent10
                };

                var id = new Id<Guid, String, DateTime, DayOfWeek,DateTime,Guid,DayOfWeek,String,DateTime,DateTimeKind,String>(
                    expectedComponent0,
                    expectedComponent1,
                    expectedComponent2,
                    expectedComponent3,
                    expectedComponent4,
                    expectedComponent5,
                    expectedComponent6,
                    expectedComponent7,
                    expectedComponent8,
                    expectedComponent9,
                    expectedComponent10);

                #endregion

                #region Act

                var actualComponents = id;

                #endregion

                #region Assert

                actualComponents.Should().Equal(expectedComponents);

                #endregion
            }
开发者ID:TonightWe,项目名称:TW.UbiquitousId,代码行数:59,代码来源:ElevenComponentIdTests.cs


示例17: ShowAlert

partial         void ShowAlert(Id sender)
        {
            NSString messageTitle = FoundationFramework.NSLocalizedString("$$Hello World", null);
            NSString informativeText = FoundationFramework.NSLocalizedString("$$It speaks English", null);
            NSString defaultButton = FoundationFramework.NSLocalizedString("$$OK", null);
            NSAlert alert = NSAlert.AlertWithMessageTextDefaultButtonAlternateButtonOtherButtonInformativeTextWithFormat(messageTitle, defaultButton, null, null, informativeText);
            alert.RunModal();
        }
开发者ID:Monobjc,项目名称:monobjc-samples,代码行数:8,代码来源:AppDelegate.cs


示例18: ShowMainWindow

partial         void ShowMainWindow(Id sender)
        {
            if (this.mainWindowController == null)
            {
                this.mainWindowController = new MainWindowController();
            }
            this.mainWindowController.ShowWindow(null);
        }
开发者ID:Monobjc,项目名称:monobjc-samples,代码行数:8,代码来源:AppController.cs


示例19: ShowInspector

partial         void ShowInspector(Id sender)
        {
            if (this.inspectorController == null)
            {
                this.inspectorController = new InspectorController();
            }
            this.inspectorController.ShowWindow(null);
        }
开发者ID:Monobjc,项目名称:monobjc-samples,代码行数:8,代码来源:AppController.cs


示例20: Player

 public Player(Id id)
 {
     this.Id = id;
     poisonCounter = new PoisonCounter(Id);
     this.poisonCounter.Count = initialPoison;
     this.Hitpoints = initialHp;
     this.ScoreSaved = false;
 }
开发者ID:kulhajs,项目名称:mtg_lifecounter,代码行数:8,代码来源:Player.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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