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

C# CSharp.InterfaceMemberBase类代码示例

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

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



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

示例1: VerifyImplements

		/// <summary>
		///   Performs checks for an explicit interface implementation.  First it
		///   checks whether the `interface_type' is a base inteface implementation.
		///   Then it checks whether `name' exists in the interface type.
		/// </summary>
		public bool VerifyImplements (InterfaceMemberBase mb)
		{
			var ifaces = spec.Interfaces;
			if (ifaces != null) {
				foreach (TypeSpec t in ifaces){
					if (t == mb.InterfaceType)
						return true;
				}
			}
			
			Report.SymbolRelatedToPreviousError (mb.InterfaceType);
			Report.Error (540, mb.Location, "`{0}': containing type does not implement interface `{1}'",
				mb.GetSignatureForError (), mb.InterfaceType.GetSignatureForError ());
			return false;
		}
开发者ID:fvalette,项目名称:mono,代码行数:20,代码来源:class.cs


示例2: VerifyImplements

		/// <summary>
		///   Performs checks for an explicit interface implementation.  First it
		///   checks whether the `interface_type' is a base inteface implementation.
		///   Then it checks whether `name' exists in the interface type.
		/// </summary>
		public bool VerifyImplements (InterfaceMemberBase mb)
		{
			var ifaces = PartialContainer.Interfaces;
			if (ifaces != null) {
				foreach (TypeSpec t in ifaces){
					if (t == mb.InterfaceType || t == null)
						return true;

					var expanded_base = t.Interfaces;
					if (expanded_base == null)
						continue;

					foreach (var bt in expanded_base) {
						if (bt == mb.InterfaceType)
							return true;
					}
				}
			}
			
			Report.SymbolRelatedToPreviousError (mb.InterfaceType);
			Report.Error (540, mb.Location, "`{0}': containing type does not implement interface `{1}'",
				mb.GetSignatureForError (), mb.InterfaceType.GetSignatureForError ());
			return false;
		}
开发者ID:razzfazz,项目名称:mono,代码行数:29,代码来源:class.cs


示例3: AddMemberToList

		private void AddMemberToList (InterfaceMemberBase mc, List<MemberCore> alist)
		{
			if (ordered_explicit_member_list == null)  {
				ordered_explicit_member_list = new List<MemberCore> ();
				ordered_member_list = new List<MemberCore> ();
			}

			if (mc.IsExplicitImpl) {
				if (Kind == MemberKind.Interface) {
					Report.Error (541, mc.Location,
						"`{0}': explicit interface declaration can only be declared in a class or struct",
						mc.GetSignatureForError ());
				}

				ordered_explicit_member_list.Add (mc);
				alist.Insert (0, mc);
			} else {
				ordered_member_list.Add (mc);
				alist.Add (mc);
			}

		}
开发者ID:jordanbtucker,项目名称:mono,代码行数:22,代码来源:class.cs


示例4: SetupName

		static MemberName SetupName (string prefix, InterfaceMemberBase member, Location loc)
		{
			return new MemberName (member.MemberName.Left, prefix + member.ShortName, member.MemberName.ExplicitInterface, loc);
		}
开发者ID:OpenFlex,项目名称:playscript-mono,代码行数:4,代码来源:method.cs


示例5: UpdateName

		public void UpdateName (InterfaceMemberBase member)
		{
			SetMemberName (SetupName (prefix, member, Location));
		}
开发者ID:OpenFlex,项目名称:playscript-mono,代码行数:4,代码来源:method.cs


示例6: MethodData

		public MethodData (InterfaceMemberBase member,
				   Modifiers modifiers, MethodAttributes flags, 
				   IMethodData method,
				   MethodSpec parent_method)
			: this (member, modifiers, flags, method)
		{
			this.parent_method = parent_method;
		}
开发者ID:OpenFlex,项目名称:playscript-mono,代码行数:8,代码来源:method.cs


示例7: AbstractPropertyEventMethod

		public AbstractPropertyEventMethod (InterfaceMemberBase member, string prefix, Attributes attrs, Location loc)
			: base (member.Parent, SetupName (prefix, member, loc), attrs)
		{
			this.prefix = prefix;
		}
开发者ID:OpenFlex,项目名称:playscript-mono,代码行数:5,代码来源:method.cs


示例8: AddExplicitInterfaces

			void AddExplicitInterfaces (MonoDevelop.Projects.Dom.AbstractMember member, InterfaceMemberBase mcsMember)
			{
				if (!mcsMember.IsExplicitImpl)
					return;
				member.AddExplicitInterface (ConvertReturnType (mcsMember.MemberName.Left));
			}
开发者ID:RainsSoft,项目名称:playscript-monodevelop,代码行数:6,代码来源:McsParser.cs


示例9: CheckAccessibility

		public override bool CheckAccessibility (InterfaceMemberBase member)
		{
			return true;
		}
开发者ID:bl8,项目名称:mono,代码行数:4,代码来源:parameter.cs


示例10: MethodData

		public MethodData (InterfaceMemberBase member,
				   Modifiers modifiers, MethodAttributes flags, 
				   IMethodData method, MethodBuilder builder,
				   GenericMethod generic, MethodSpec parent_method)
			: this (member, modifiers, flags, method)
		{
			this.builder = builder;
			this.GenericMethod = generic;
			this.parent_method = parent_method;
		}
开发者ID:spencerhakim,项目名称:mono,代码行数:10,代码来源:method.cs


示例11: AddGenericMember

		public void AddGenericMember (MemberInfo mi, InterfaceMemberBase mc)
		{
			AddMember (mi.MemberType, GetBindingFlags (mc.ModFlags), Container,
				MemberName.MakeName (mc.GetFullName (mc.MemberName), mc.MemberName.TypeArguments), mi);
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:5,代码来源:decl.cs


示例12: AbstractPropertyEventMethod

        public AbstractPropertyEventMethod(InterfaceMemberBase member, Accessor accessor,
            string prefix)
            : base(member.Parent, SetupName (prefix, member, accessor.Location),
				accessor.Attributes)
        {
            this.prefix = prefix;
            this.block = accessor.Block;
        }
开发者ID:speier,项目名称:shake,代码行数:8,代码来源:method.cs


示例13: CheckAccessibility

		public virtual bool CheckAccessibility (InterfaceMemberBase member)
		{
			if (parameter_type == null || TypeManager.IsGenericParameter (parameter_type))
				return true;

			return member.IsAccessibleAs (parameter_type);
		}
开发者ID:afaerber,项目名称:mono,代码行数:7,代码来源:parameter.cs


示例14: VerifyImplements

		/// <summary>
		///   Performs checks for an explicit interface implementation.  First it
		///   checks whether the `interface_type' is a base inteface implementation.
		///   Then it checks whether `name' exists in the interface type.
		/// </summary>
		public bool VerifyImplements (InterfaceMemberBase mb)
		{
			if (ifaces != null) {
				foreach (Type t in ifaces){
					if (TypeManager.IsEqual (t, mb.InterfaceType))
						return true;
				}
			}
			
			Report.SymbolRelatedToPreviousError (mb.InterfaceType);
			Report.Error (540, mb.Location, "`{0}': containing type does not implement interface `{1}'",
				mb.GetSignatureForError (), TypeManager.CSharpName (mb.InterfaceType));
			return false;
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:19,代码来源:class.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# CSharp.Invocation类代码示例发布时间:2022-05-26
下一篇:
C# CSharp.IntConstant类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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