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

C# System.Object类代码示例

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

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



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

示例1: FieldEditor

 public FieldEditor(System.Object data)
 {
     this.data = data;
     _fieldInfos = data.GetType().GetFields(BINDING);
     for (var i = 0; i < _fieldInfos.Length; i++)
         GuiFields.Add(GenerateGUI(_fieldInfos[i]));
 }
开发者ID:nobnak,项目名称:ParameterUnity,代码行数:7,代码来源:FieldEditor.cs


示例2: Start

 public void Start()
 {
     if (true)
     {
         var obj = new System.Object();
     }
     else
     {
         var obj2 = new System.Object();
     }
 }
开发者ID:modulexcite,项目名称:PowerShellCodeDomProvider,代码行数:11,代码来源:TestData.cs


示例3: Telegram

        public Telegram(float time,
                        int sender,
                        int receiver,
                        int msg_type,
                        System.Object info)
        {
            this.DispatchTime = time;

            this.Sender = sender;

            this.Receiver = receiver;

            this.MsgType = msg_type;

            this.ExtraInfo = info;
        }
开发者ID:wyb314,项目名称:FightGameFrameWork,代码行数:16,代码来源:Telegram.cs


示例4: MoCapDataBuffer

		/// <summary>
		/// Creates a new MoCap data buffer object.
		/// </summary>
		/// <param name="name">name of this buffer</param>
		/// <param name="owner">game object that owns this buffer</param>
		/// <param name="obj">game object to associate with this buffer</param>
		/// <param name="data">arbitrary object to associate with this buffer</param>
		/// 
		public MoCapDataBuffer(string name, GameObject owner, GameObject obj, System.Object data = null)
		{
			// find any manipulators and store them
			modifiers = owner.GetComponents<IModifier>();

			// specifically find the delay manipulator and set the FIFO size accordingly
			DelayModifier delayComponent = owner.GetComponent<DelayModifier>();
			float delay = (delayComponent != null) ? delayComponent.delay : 0;
			int   delayInFrames = Mathf.Max(1, 1 + (int)(delay * 60)); // TODO: Find out or define framerate somewhere central
			pipeline = new MoCapData[delayInFrames];
			for (int i = 0; i < pipeline.Length; i++)
			{
				pipeline[i] = new MoCapData(this);
			}
			index = 0;

			firstPush       = true;
			this.Name       = name;
			this.GameObject = obj;
			this.DataObject = data;
		}
开发者ID:stefanmarks,项目名称:MotionServer_Clients,代码行数:29,代码来源:MoCapDataBuffer.cs


示例5: Node

 /// <summary>Make a new node with indicated item, and null link *</summary>
 internal Node(System.Object x)
 {
     value = x;
 }
开发者ID:nobuyukinyuu,项目名称:diddy,代码行数:5,代码来源:WaitFreeQueue.cs


示例6: Node

 /**
  * Constructs a node with the specified state.
  *
  * @param state
  *            the state in the state space to which the node corresponds.
  */
 public Node(System.Object state)
 {
     this.state = state;
     this.pathCost = 0.0;
 }
开发者ID:youthinkk,项目名称:aima-csharp,代码行数:11,代码来源:Node.cs


示例7: WaitFreeQueue

 /// <summary>
 /// Creates a new <see cref="WaitFreeQueue"/> instance.
 /// </summary>
 public WaitFreeQueue()
 {
     head = new Node(null);
     tail = head;
     tailLock = new System.Object();
 }
开发者ID:nobuyukinyuu,项目名称:diddy,代码行数:9,代码来源:WaitFreeQueue.cs


示例8: UpdateInternal

        protected override NodeRunningStatus UpdateInternal(OutputParam rInput, OutputParam rOutput)
        {
            NodeRunningStatus rIsFinish = NodeRunningStatus.Finish;

            if (mActionStatus == NodeActionStaus.Ready)
            {
                Enter(rInput);
                mNeedExit = true;
                mActionStatus = NodeActionStaus.Running;
                SetActiveNode(this);
            }

            if (mActionStatus == NodeActionStaus.Running)
            {
                rIsFinish = Execute(rInput, rOutput);
                SetActiveNode(this);
                if(rIsFinish != NodeRunningStatus.Executing)
                {
                    mActionStatus = NodeActionStaus.Finish;
                }
            }

            if (mActionStatus == NodeActionStaus.Finish)
            {

                if (mNeedExit) Exit(rInput, rIsFinish);
                mActionStatus = NodeActionStaus.Ready;
                mNeedExit = false;
                SetActiveNode(null);

                return rIsFinish;
            }

            return rIsFinish;
        }
开发者ID:meta-42,项目名称:uEasyKit,代码行数:35,代码来源:ActionNode.cs


示例9: TransitionInternal

        protected override void TransitionInternal(OutputParam rInput)
        {
            if (mNeedExit) Exit(rInput, NodeRunningStatus.TransitionError);

            SetActiveNode(null);
            mActionStatus = NodeActionStaus.Ready;
            mNeedExit = false;
        }
开发者ID:meta-42,项目名称:uEasyKit,代码行数:8,代码来源:ActionNode.cs


示例10: CreateTestFile

 private static void CreateTestFile(TestContext context, string filename, string text)
 {
     using(StreamWriter writer = new StreamWriter(context.TestRunDirectory + filename))
     {
         writer.WriteLine(text);
         writer.Flush();
     }
 }
开发者ID:robin521111,项目名称:gitextensions,代码行数:8,代码来源:PatchTest.cs


示例11: Create

		public virtual object Create (object parent, object configContext, XmlNode section)
		{
#if XML_DEP
			if (section.Attributes != null && section.Attributes.Count != 0)
				HandlersUtil.ThrowException ("Unrecognized attribute", section);

			XmlNodeList reqHandlers = section.ChildNodes;
			foreach (XmlNode child in reqHandlers) {
				XmlNodeType ntype = child.NodeType;
				if (ntype == XmlNodeType.Whitespace || ntype == XmlNodeType.Comment)
					continue;

				if (ntype != XmlNodeType.Element)
					HandlersUtil.ThrowException ("Only elements allowed", child);
				
				string name = child.Name;
				if (name == "clear") {
					if (child.Attributes != null && child.Attributes.Count != 0)
						HandlersUtil.ThrowException ("Unrecognized attribute", child);

					WebRequest.PrefixList = new ArrayList ();
					continue;
				}

				string prefix = HandlersUtil.ExtractAttributeValue ("prefix", child);
				if (name == "add") {
					string type = HandlersUtil.ExtractAttributeValue ("type", child, false);
					if (child.Attributes != null && child.Attributes.Count != 0)
						HandlersUtil.ThrowException ("Unrecognized attribute", child);

					throw new NotImplementedException ();
					//WebRequest.PrefixList.Add (new WebRequestPrefixElement(prefix, type));
					//continue;
				}

				if (name == "remove") {
					if (child.Attributes != null && child.Attributes.Count != 0)
						HandlersUtil.ThrowException ("Unrecognized attribute", child);

					throw new NotImplementedException ();
					// WebRequest.RemovePrefix (prefix);
					// continue;
				}

				HandlersUtil.ThrowException ("Unexpected element", child);
			}
#endif			

			return null;
		}
开发者ID:ItsVeryWindy,项目名称:mono,代码行数:50,代码来源:WebRequestModuleHandler.cs


示例12: Config

        public static void Config(TestContext context)
        {
            //  <system.data>
            //    <DbProviderFactories>
            //      <add
            //          name="Firebird Data Provider"
            //          invariant="FirebirdSql.Data.FirebirdClient" description="Firebird"
            //          type="FirebirdSql.Data.FirebirdClient.FirebirdClientFactory, FirebirdSql.Data.FirebirdClient, Version=2.5.2.0, Culture=neutral, PublicKeyToken=3750abcc3150b00c"
            //      />
            //    </DbProviderFactories>
            //  </system.data>

            ProviderChecker.Check(ProviderName, ConnectionString);


        }
开发者ID:Petran15,项目名称:dbschemareader,代码行数:16,代码来源:Firebird.cs


示例13: Create

		public virtual object Create (object parent, object configContext, XmlNode section)
		{
#if (XML_DEP)			
			if (section.Attributes != null && section.Attributes.Count != 0)
				HandlersUtil.ThrowException ("Unrecognized attribute", section);

			XmlNodeList httpHandlers = section.ChildNodes;
			foreach (XmlNode child in httpHandlers) {
				XmlNodeType ntype = child.NodeType;
				if (ntype == XmlNodeType.Whitespace || ntype == XmlNodeType.Comment)
					continue;

				if (ntype != XmlNodeType.Element)
					HandlersUtil.ThrowException ("Only elements allowed", child);
				
				string name = child.Name;
				if (name == "clear") {
					if (child.Attributes != null && child.Attributes.Count != 0)
						HandlersUtil.ThrowException ("Unrecognized attribute", child);

					AuthenticationManager.Clear ();
					continue;
				}

				string type = HandlersUtil.ExtractAttributeValue ("type", child);
				if (child.Attributes != null && child.Attributes.Count != 0)
					HandlersUtil.ThrowException ("Unrecognized attribute", child);

				if (name == "add") {
					AuthenticationManager.Register (CreateInstance (type, child));
					continue;
				}

				if (name == "remove") {
					AuthenticationManager.Unregister (CreateInstance (type, child));
					continue;
				}

				HandlersUtil.ThrowException ("Unexpected element", child);
			}

			return AuthenticationManager.RegisteredModules;
#else
			return null;
#endif			
		}
开发者ID:nlhepler,项目名称:mono,代码行数:46,代码来源:NetAuthenticationModuleHandler.cs


示例14: ConfigurationException

		static internal void ThrowException (string msg, XmlNode node)
		{
			if (node != null && node.Name != String.Empty)
				msg = msg + " (node name: " + node.Name + ") ";
			throw new ConfigurationException (msg, node);
		}
开发者ID:nlhepler,项目名称:mono,代码行数:6,代码来源:ConnectionManagementHandler.cs


示例15: ExtractAttributeValue

		static internal string ExtractAttributeValue (string attKey, XmlNode node)
		{
			return ExtractAttributeValue (attKey, node, false);
		}
开发者ID:nlhepler,项目名称:mono,代码行数:4,代码来源:ConnectionManagementHandler.cs


示例16: UpdateSelectedConsoleEntry

        public void UpdateSelectedConsoleEntry()
        {
            //Debug.Log("sdf");
            lastConsoleUpdateTime = Time.realtimeSinceStartup;
            #if UNITY_EDITOR
            System.Type type = null;
            //if (consoleWindow == null) {
                type = System.Type.GetType("UnityEditor.ConsoleWindow,UnityEditor");
                FieldInfo fieldInfo = type.GetField("ms_ConsoleWindow",BindingFlags.NonPublic|BindingFlags.Static);
                consoleWindow = fieldInfo.GetValue(null);
            //}
            //else {
            //	type = consoleWindow.GetType();
            //}
            if (consoleWindow == null) return;

            FieldInfo activeContextField = type.GetField("m_ActiveContext",BindingFlags.Instance|BindingFlags.Static|BindingFlags.NonPublic);
            string activeContext = (string)activeContextField.GetValue(consoleWindow);

            FieldInfo activeContextIconField = type.GetField("m_ActiveContextIcon",BindingFlags.Instance|BindingFlags.Static|BindingFlags.NonPublic);
            Texture2D activeContextIcon = (Texture2D)activeContextIconField.GetValue(consoleWindow);

            if (lastConsoleRawText == activeContext) return;

            FieldInfo activeTextField = type.GetField("m_ActiveText",BindingFlags.Instance|BindingFlags.Static|BindingFlags.NonPublic);
            string activeText = (string)activeTextField.GetValue(consoleWindow);

            currentFileLogEntry = null;
            currentLogEntry = null;
            forceClosed = false;
            wantsReapint = true;
            editor.editorWindow.Repaint();
            lastConsoleRawText = activeContext;

            //compiler error/warnings:
            Regex regex = new Regex(@"(?<filename>^Assets/(?:\w+/)*(?:\w+\.\w+)+)\((?:(?<line>\d+),(?<column>\d+))\): ((?<type>warning|error) )?\w+: (?<message>(\.|\n)*)");
            Match match = regex.Match(activeText);

            if (match.Success) {
                string fileName = match.Groups["filename"].Value;
                int line = int.Parse(match.Groups["line"].Value);
                int column = int.Parse(match.Groups["column"].Value);
                string logType = match.Groups["type"].Value;
                //string message = match.Groups["message"].Value;
                UIDELogEntry logEntry = new UIDELogEntry();
                logEntry.fileName = fileName;
                logEntry.line = line;
                logEntry.column = column;
                logEntry.logType = logType;
                logEntry.message = "";
                if (logEntry.logType == "") {
                    logEntry.logType = "Unknown Assert";
                }

                if (fileName == editor.filePath) {
                    currentFileLogEntry = logEntry;
                }
                currentLogEntry = logEntry;
                //lastEntryChangeTime = Time.realtimeSinceStartup;
                return;
            }

            Regex conRegex = new Regex(@"(?<type>Assert|Log|Error) in file: (?<filename>Assets/(?:\w+/)*(?:\w+\.\w+)+) at line: (?:(?<line>\d+))");
            Match conMatch = conRegex.Match(activeContext);
            if (conMatch.Success) {

                string fileName = conMatch.Groups["filename"].Value;
                int line = int.Parse(conMatch.Groups["line"].Value);
                int column = 0;
                string logType = conMatch.Groups["type"].Value;
                if (activeContextIcon != null) {
                    if (activeContextIcon.name == "d_console.infoicon.sml") {
                        logType = "Assert";
                    }
                    if (activeContextIcon.name == "d_console.erroricon.sml") {
                        logType = "Runtime Error";
                    }
                }
                //string message = activeText;
                UIDELogEntry logEntry = new UIDELogEntry();
                logEntry.fileName = fileName;
                logEntry.line = line;
                logEntry.column = column;
                logEntry.logType = logType;
                logEntry.message = "";
                if (logEntry.logType == "") {
                    logEntry.logType = "Unknown Assert";
                }
                //d_console.infoicon.sml
                //d_console.erroricon.sml
                //Debug.Log(activeContextIcon);

                if (fileName == editor.filePath) {
                    currentFileLogEntry = logEntry;
                }
                currentLogEntry = logEntry;
                //Match dum = null;
                //Debug.Log(dum.Index);
                return;
            }
//.........这里部分代码省略.........
开发者ID:azanium,项目名称:TruthNIslam-Unity,代码行数:101,代码来源:ErrorTracking.cs


示例17:

		//# define sqlite3WalEndWriteTransaction(x)      0
		static int sqlite3WalEndWriteTransaction(Wal x)
		{
			return 0;
		}
开发者ID:RainsSoft,项目名称:CsharpSQLite,代码行数:5,代码来源:wal_h.cs


示例18: sqlite3WalBeginWriteTransaction

/* Obtain or release the WRITER lock. */
int sqlite3WalBeginWriteTransaction(Wal *pWal);
开发者ID:RainsSoft,项目名称:CsharpSQLite,代码行数:2,代码来源:wal_h.cs


示例19: sqlite3WalEndWriteTransaction

int sqlite3WalEndWriteTransaction(Wal *pWal);
开发者ID:RainsSoft,项目名称:CsharpSQLite,代码行数:1,代码来源:wal_h.cs


示例20: ClearLog

 public void ClearLog()
 {
     #if UNITY_EDITOR
     System.Type type = null;
     if (consoleWindow == null) {
         type = System.Type.GetType("UnityEditor.ConsoleWindow,UnityEditor");
         FieldInfo fieldInfo = type.GetField("ms_ConsoleWindow",BindingFlags.NonPublic|BindingFlags.Static);
         consoleWindow = fieldInfo.GetValue(null);
     }
     else {
         type = consoleWindow.GetType();
     }
     if (consoleWindow == null) return;
     MethodInfo onDisableMethod = type.GetMethod("OnDisable",BindingFlags.Instance|BindingFlags.NonPublic);
     onDisableMethod.Invoke(consoleWindow,new object[] {});
     MethodInfo onEnableMethod = type.GetMethod("OnEnable",BindingFlags.Instance|BindingFlags.NonPublic);
     onEnableMethod.Invoke(consoleWindow,new object[] {});
     MethodInfo setActiveMathod = type.GetMethod("SetActiveEntry",BindingFlags.Instance|BindingFlags.NonPublic);
     setActiveMathod.Invoke(consoleWindow,new object[] {null});
     #endif
 }
开发者ID:azanium,项目名称:TruthNIslam-Unity,代码行数:21,代码来源:ErrorTracking.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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