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


C# IObjectSource类代码示例

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


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

示例1: BaseTypeViewSource

		public BaseTypeViewSource (EvaluationContext ctx, IObjectSource objectSource, object type, object obj)
		{
			this.ctx = ctx;
			this.type = type;
			this.obj = obj;
			this.objectSource = objectSource;
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:7,代码来源:BaseTypeViewSource.cs

示例2: CreateNode

		static ObjectValue CreateNode (EvaluationContext ctx, IObjectSource objectSource, object type, object obj, BindingFlags bindingFlags, string label)
		{
			FilteredMembersSource src = new FilteredMembersSource (ctx, objectSource, type, obj, bindingFlags);
			src.Connect ();
			ObjectValue val = ObjectValue.CreateObject (src, new ObjectPath (label), "", "", ObjectValueFlags.Group|ObjectValueFlags.ReadOnly|ObjectValueFlags.NoRefresh, null);
			val.ChildSelector = "";
			return val;
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:8,代码来源:FilteredMembersSource.cs

示例3: CreateRawView

		public static ObjectValue CreateRawView (EvaluationContext ctx, IObjectSource objectSource, object obj)
		{
			RawViewSource src = new RawViewSource (ctx, objectSource, obj);
			src.Connect ();
			ObjectValue val = ObjectValue.CreateObject (src, new ObjectPath ("Raw View"), "", "", ObjectValueFlags.Group|ObjectValueFlags.ReadOnly|ObjectValueFlags.NoRefresh, null);
			val.ChildSelector = "";
			return val;
		}
开发者ID:RainsSoft,项目名称:playscript-monodevelop,代码行数:8,代码来源:RawViewSource.cs

示例4: FilteredMembersSource

		public FilteredMembersSource (EvaluationContext ctx, IObjectSource objectSource, object type, object obj, BindingFlags bindingFlags)
		{
			this.ctx = ctx;
			this.obj = obj;
			this.type = type;
			this.bindingFlags = bindingFlags;
			this.objectSource = objectSource;
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:8,代码来源:FilteredMembersSource.cs

示例5: CreateBaseTypeView

		public static ObjectValue CreateBaseTypeView (EvaluationContext ctx, IObjectSource objectSource, object type, object obj)
		{
			BaseTypeViewSource src = new BaseTypeViewSource (ctx, objectSource, type, obj);
			src.Connect ();
			string tname = ctx.Adapter.GetDisplayTypeName (ctx, type);
			ObjectValue val = ObjectValue.CreateObject (src, new ObjectPath ("base"), tname, "{" + tname + "}", ObjectValueFlags.Type|ObjectValueFlags.ReadOnly|ObjectValueFlags.NoRefresh, null);
			val.ChildSelector = "";
			return val;
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:9,代码来源:BaseTypeViewSource.cs

示例6: RemoteRawValue

 public RemoteRawValue(EvaluationContext gctx, IObjectSource source, object targetObject)
 {
     this.ctx = gctx.Clone ();
     ctx.Options.AllowTargetInvoke = true;
     ctx.Options.AllowMethodEvaluation = true;
     this.targetObject = targetObject;
     this.source = source;
     Connect ();
 }
开发者ID:peterdocter,项目名称:debugger-libs,代码行数:9,代码来源:RemoteRawValue.cs

示例7: ZyanServerQueryHandler

        /// <summary>
        /// Creates ZyanServerQueryHandler instance.
        /// </summary>
        /// <param name="source">IObjectSource instance</param>
        public ZyanServerQueryHandler(IObjectSource source)
        {
            if (source == null)
            {
                throw new ArgumentNullException("source");
            }

            InnerHandler = new ServerQueryHandler(new ZyanObjectQueryHandler(source));
        }
开发者ID:yallie,项目名称:zyan,代码行数:13,代码来源:ZyanServerQueryHandler.cs

示例8: ObjectValueHasChildren

		public virtual bool ObjectValueHasChildren (EvaluationContext ctx, IObjectSource objectSource, object type, object obj, bool dereferenceProxy)
		{
			if (obj is EvaluationResult)
				return false;

			if (IsArray (ctx, obj))
				return true;

			if (IsPrimitive (ctx, obj))
				return false;

			bool showRawView = false;
			
			// If there is a proxy, it has to show the members of the proxy
			object proxy = obj;
			if (dereferenceProxy) {
				proxy = GetProxyObject (ctx, obj);
				if (proxy != obj) {
					type = GetValueType (ctx, proxy);
					showRawView = true;
				}
			}

			TypeDisplayData tdata = GetTypeDisplayData (ctx, type);
			bool groupPrivateMembers = ctx.Options.GroupPrivateMembers && (ctx.Options.GroupUserPrivateMembers || IsExternalType (ctx, type));
			BindingFlags flattenFlag = ctx.Options.FlattenHierarchy ? (BindingFlags)0 : BindingFlags.DeclaredOnly;
			BindingFlags nonNonPublicFlag = groupPrivateMembers || showRawView ? (BindingFlags)0 : BindingFlags.NonPublic;
			BindingFlags staticFlag = ctx.Options.GroupStaticMembers ? (BindingFlags)0 : BindingFlags.Static;
			BindingFlags access = BindingFlags.Public | BindingFlags.Instance | flattenFlag | nonNonPublicFlag | staticFlag;
			
			// Load all members to a list before creating the object values,
			// to avoid problems with objects being invalidated due to evaluations in the target,
			List<ValueReference> list = new List<ValueReference> ();
			list.AddRange (GetMembersSorted (ctx, objectSource, type, proxy, access));
			object tdataType = type;
			
			foreach (ValueReference val in list) {
				try {
					object decType = val.DeclaringType;
					if (decType != null && decType != tdataType) {
						tdataType = decType;
						tdata = GetTypeDisplayData (ctx, decType);
					}

					DebuggerBrowsableState state = tdata.GetMemberBrowsableState (val.Name);
					if (state == DebuggerBrowsableState.Never)
						continue;

					return true;
				} catch (Exception ex) {
					ctx.WriteDebuggerError (ex);
				}
			}

			if (IsArray (ctx, proxy))
				return true;

			if (ctx.Options.GroupStaticMembers && HasMembers (ctx, type, proxy, BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic | flattenFlag))
				return true;

			if (groupPrivateMembers && HasMembers (ctx, type, proxy, BindingFlags.Instance | BindingFlags.NonPublic | flattenFlag | staticFlag))
				return true;

			if (!ctx.Options.FlattenHierarchy) {
				object baseType = GetBaseType (ctx, type, false);
				if (baseType != null)
					return true;
			}

			return false;
		}
开发者ID:rajeshpillai,项目名称:monodevelop,代码行数:71,代码来源:ObjectValueAdaptor.cs

示例9: Object

 public static CommandTokenMatcher Object(String CaptureName, IObjectSource Source, Func<Actor, MudObject, MatchPreference> ScoreFunc, ObjectMatcherSettings Settings = ObjectMatcherSettings.UnderstandMe)
 {
     return new ObjectMatcher(CaptureName, Source, ScoreFunc, Settings);
 }
开发者ID:Reddit-Mud,项目名称:RMUD,代码行数:4,代码来源:ObjectMatcher.cs

示例10: GetMembersSorted

		internal IEnumerable<ValueReference> GetMembersSorted (EvaluationContext ctx, IObjectSource objectSource, object t, object co, BindingFlags bindingFlags)
		{
			List<ValueReference> list = new List<ValueReference> ();
			foreach (ValueReference vr in GetMembers (ctx, t, co, bindingFlags)) {
				vr.ParentSource = objectSource;
				list.Add (vr);
			}
			list.Sort (delegate (ValueReference v1, ValueReference v2) {
				return v1.Name.CompareTo (v2.Name);
			});
			return list;
		}
开发者ID:kthguru,项目名称:monodevelop,代码行数:12,代码来源:ObjectValueAdaptor.cs

示例11: GetMember

		public ValueReference GetMember (EvaluationContext ctx, IObjectSource objectSource, object t, object co, string name)
		{
			ValueReference m = GetMember (ctx, t, co, name);
			if (m != null)
				m.ParentSource = objectSource;
			return m;
		}
开发者ID:kthguru,项目名称:monodevelop,代码行数:7,代码来源:ObjectValueAdaptor.cs

示例12: GetMembers

		public IEnumerable<ValueReference> GetMembers (EvaluationContext ctx, IObjectSource objectSource, object t, object co)
		{
			foreach (ValueReference val in GetMembers (ctx, t, co, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static)) {
				val.ParentSource = objectSource;
				yield return val;
			}
		}
开发者ID:kthguru,项目名称:monodevelop,代码行数:7,代码来源:ObjectValueAdaptor.cs

示例13: GetObjectValueChildren

		public ObjectValue[] GetObjectValueChildren (EvaluationContext ctx, IObjectSource objectSource, object obj, int firstItemIndex, int count)
		{
			return GetObjectValueChildren (ctx, objectSource, GetValueType (ctx, obj), obj, firstItemIndex, count, true);
		}
开发者ID:kthguru,项目名称:monodevelop,代码行数:4,代码来源:ObjectValueAdaptor.cs

示例14: CreateStaticsNode

		public static ObjectValue CreateStaticsNode (EvaluationContext ctx, IObjectSource objectSource, object type, object obj, BindingFlags bindingFlags)
		{
			return CreateNode (ctx, objectSource, type, obj, bindingFlags, "Static members");
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:4,代码来源:FilteredMembersSource.cs

示例15: ObjectMatcher

		public ObjectMatcher(String CaptureName, IObjectSource ObjectSource, ObjectMatcherSettings Settings = ObjectMatcherSettings.UnderstandMe)
		{
			this.CaptureName = CaptureName;
			this.ObjectSource = ObjectSource;
			this.Settings = Settings;
		}
开发者ID:piggybankcowboy,项目名称:let-us-write-a-mud,代码行数:6,代码来源:ObjectMatcher.cs


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