本文整理汇总了C#中Mono.CSharp.ParametersCompiled类的典型用法代码示例。如果您正苦于以下问题:C# ParametersCompiled类的具体用法?C# ParametersCompiled怎么用?C# ParametersCompiled使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ParametersCompiled类属于Mono.CSharp命名空间,在下文中一共展示了ParametersCompiled类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: MethodCore
public MethodCore (DeclSpace parent, GenericMethod generic,
FullNamedExpression type, Modifiers mod, Modifiers allowed_mod,
MemberName name, Attributes attrs, ParametersCompiled parameters)
: base (parent, generic, type, mod, allowed_mod, name, attrs)
{
this.parameters = parameters;
}
开发者ID:spencerhakim,项目名称:mono,代码行数:7,代码来源:method.cs
示例2: Accessor
public Accessor(ToplevelBlock b, Modifiers mod, Attributes attrs, ParametersCompiled p, Location loc)
{
Block = b;
Attributes = attrs;
Location = loc;
Parameters = p;
ModFlags = ModifiersExtensions.Check (AllowedModifiers, mod, 0, loc, RootContext.ToplevelTypes.Compiler.Report);
}
开发者ID:speier,项目名称:shake,代码行数:8,代码来源:property.cs
示例3: Delegate
public Delegate(TypeContainer parent, FullNamedExpression type, Modifiers mod_flags, MemberName name, ParametersCompiled param_list,
Attributes attrs)
: base(parent, name, attrs, MemberKind.Delegate)
{
this.ReturnType = type;
ModFlags = ModifiersExtensions.Check (AllowedModifiers, mod_flags,
IsTopLevel ? Modifiers.INTERNAL :
Modifiers.PRIVATE, name.Location, Report);
parameters = param_list;
spec = new TypeSpec (Kind, null, this, null, ModFlags | Modifiers.SEALED);
}
开发者ID:svermeulen,项目名称:NRefactory,代码行数:11,代码来源:delegate.cs
示例4: Delegate
public Delegate (NamespaceEntry ns, DeclSpace parent, FullNamedExpression type,
int mod_flags, MemberName name, ParametersCompiled param_list,
Attributes attrs)
: base (ns, parent, name, attrs, Kind.Delegate)
{
this.ReturnType = type;
ModFlags = Modifiers.Check (AllowedModifiers, mod_flags,
IsTopLevel ? Modifiers.INTERNAL :
Modifiers.PRIVATE, name.Location, Report);
Parameters = param_list;
}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:12,代码来源:delegate.cs
示例5: AnonymousMethodBody
public AnonymousMethodBody (ParametersCompiled parameters,
ParametersBlock block, TypeSpec return_type, TypeSpec delegate_type,
Location loc)
: base (block, return_type, loc)
{
this.type = delegate_type;
this.parameters = parameters;
}
开发者ID:rabink,项目名称:mono,代码行数:8,代码来源:anonymous.cs
示例6: CompatibleMethodFactory
protected virtual AnonymousMethodBody CompatibleMethodFactory (TypeSpec return_type, TypeSpec delegate_type, ParametersCompiled p, ParametersBlock b)
{
return new AnonymousMethodBody (p, b, return_type, delegate_type, loc);
}
开发者ID:rabink,项目名称:mono,代码行数:4,代码来源:anonymous.cs
示例7: LambdaMethod
public LambdaMethod (ParametersCompiled parameters,
ParametersBlock block, TypeSpec return_type, TypeSpec delegate_type,
Location loc)
: base (parameters, block, return_type, delegate_type, loc)
{
}
开发者ID:0xb1dd1e,项目名称:NRefactory,代码行数:6,代码来源:lambda.cs
示例8: Create
public static Method Create (TypeDefinition parent, FullNamedExpression returnType, Modifiers mod,
MemberName name, ParametersCompiled parameters, Attributes attrs)
{
var m = new Method (parent, returnType, mod, name, parameters, attrs);
if ((mod & Modifiers.PARTIAL) != 0) {
const Modifiers invalid_partial_mod = Modifiers.AccessibilityMask | Modifiers.ABSTRACT | Modifiers.EXTERN |
Modifiers.NEW | Modifiers.OVERRIDE | Modifiers.SEALED | Modifiers.VIRTUAL;
if ((mod & invalid_partial_mod) != 0) {
m.Report.Error (750, m.Location,
"A partial method cannot define access modifier or any of abstract, extern, new, override, sealed, or virtual modifiers");
mod &= ~invalid_partial_mod;
}
if ((parent.ModFlags & Modifiers.PARTIAL) == 0) {
m.Report.Error (751, m.Location,
"A partial method must be declared within a partial class or partial struct");
}
}
if ((mod & Modifiers.STATIC) == 0 && parameters.HasExtensionMethodType) {
m.Report.Error (1105, m.Location, "`{0}': Extension methods must be declared static",
m.GetSignatureForError ());
}
return m;
}
开发者ID:OpenFlex,项目名称:playscript-mono,代码行数:29,代码来源:method.cs
示例9: Method
public Method (TypeDefinition parent, FullNamedExpression return_type, Modifiers mod, MemberName name, ParametersCompiled parameters, Attributes attrs)
: base (parent, return_type, mod,
parent.PartialContainer.Kind == MemberKind.Interface ? AllowedModifiersInterface :
parent.PartialContainer.Kind == MemberKind.Struct ? AllowedModifiersStruct | Modifiers.ASYNC :
AllowedModifiersClass | Modifiers.ASYNC,
name, attrs, parameters)
{
}
开发者ID:OpenFlex,项目名称:playscript-mono,代码行数:8,代码来源:method.cs
示例10: MethodCore
public MethodCore (TypeDefinition parent, FullNamedExpression type, Modifiers mod, Modifiers allowed_mod,
MemberName name, Attributes attrs, ParametersCompiled parameters)
: base (parent, type, mod, allowed_mod, name, attrs)
{
this.parameters = parameters;
}
开发者ID:OpenFlex,项目名称:playscript-mono,代码行数:6,代码来源:method.cs
示例11: Indexer
public Indexer (TypeDefinition parent, FullNamedExpression type, MemberName name, Modifiers mod, ParametersCompiled parameters, Attributes attrs)
: base (parent, type, mod,
parent.PartialContainer.Kind == MemberKind.Interface ? AllowedInterfaceModifiers : AllowedModifiers,
name, attrs)
{
this.parameters = parameters;
}
开发者ID:bbqchickenrobot,项目名称:playscript-mono,代码行数:7,代码来源:property.cs
示例12: SetIndexerMethod
public SetIndexerMethod (PropertyBase property, Modifiers modifiers, ParametersCompiled parameters, Attributes attrs, Location loc)
: base (property, modifiers, parameters, attrs, loc)
{
}
开发者ID:bbqchickenrobot,项目名称:playscript-mono,代码行数:4,代码来源:property.cs
示例13: AEventAccessor
protected AEventAccessor (Event method, string prefix, Attributes attrs, Location loc)
: base (method, prefix, attrs, loc)
{
this.method = method;
this.ModFlags = method.ModFlags;
this.parameters = ParametersCompiled.CreateImplicitParameter (method.TypeExpression, loc);
}
开发者ID:bbqchickenrobot,项目名称:playscript-mono,代码行数:7,代码来源:property.cs
示例14: MergeGenerated
//
// Use this method when you merge compiler generated parameters with user parameters
//
public static ParametersCompiled MergeGenerated (CompilerContext ctx, ParametersCompiled userParams, bool checkConflicts, Parameter[] compilerParams, TypeSpec[] compilerTypes)
{
Parameter[] all_params = new Parameter [userParams.Count + compilerParams.Length];
userParams.FixedParameters.CopyTo(all_params, 0);
TypeSpec [] all_types;
if (userParams.types != null) {
all_types = new TypeSpec [all_params.Length];
userParams.Types.CopyTo (all_types, 0);
} else {
all_types = null;
}
int last_filled = userParams.Count;
int index = 0;
foreach (Parameter p in compilerParams) {
for (int i = 0; i < last_filled; ++i) {
while (p.Name == all_params [i].Name) {
if (checkConflicts && i < userParams.Count) {
ctx.Report.Error (316, userParams[i].Location,
"The parameter name `{0}' conflicts with a compiler generated name", p.Name);
}
p.Name = '_' + p.Name;
}
}
all_params [last_filled] = p;
if (all_types != null)
all_types [last_filled] = compilerTypes [index++];
++last_filled;
}
ParametersCompiled parameters = new ParametersCompiled (all_params, all_types);
parameters.has_params = userParams.has_params;
return parameters;
}
开发者ID:bl8,项目名称:mono,代码行数:38,代码来源:parameter.cs
示例15: Destructor
public Destructor (TypeDefinition parent, Modifiers mod, ParametersCompiled parameters, Attributes attrs, Location l)
: base (parent, null, mod, AllowedModifiers, new MemberName (MetadataName, l), attrs, parameters)
{
ModFlags &= ~Modifiers.PRIVATE;
ModFlags |= Modifiers.PROTECTED | Modifiers.OVERRIDE;
}
开发者ID:OpenFlex,项目名称:playscript-mono,代码行数:6,代码来源:method.cs
示例16: Operator
public Operator (TypeDefinition parent, OpType type, FullNamedExpression ret_type, Modifiers mod_flags, ParametersCompiled parameters,
ToplevelBlock block, Attributes attrs, Location loc)
: base (parent, ret_type, mod_flags, AllowedModifiers, new MemberName (GetMetadataName (type), loc), attrs, parameters)
{
OperatorType = type;
Block = block;
}
开发者ID:OpenFlex,项目名称:playscript-mono,代码行数:7,代码来源:method.cs
示例17: SetMethod
public SetMethod (PropertyBase method, Modifiers modifiers, ParametersCompiled parameters, Attributes attrs, Location loc)
: base (method, Prefix, modifiers, attrs, loc)
{
this.parameters = parameters;
}
开发者ID:bbqchickenrobot,项目名称:playscript-mono,代码行数:5,代码来源:property.cs
示例18: MethodOrOperator
protected MethodOrOperator (TypeDefinition parent, FullNamedExpression type, Modifiers mod, Modifiers allowed_mod, MemberName name,
Attributes attrs, ParametersCompiled parameters)
: base (parent, type, mod, allowed_mod, name, attrs, parameters)
{
}
开发者ID:OpenFlex,项目名称:playscript-mono,代码行数:5,代码来源:method.cs
示例19: CheckMissingAccessor
void CheckMissingAccessor (MemberKind kind, ParametersCompiled parameters, bool get)
{
if (IsExplicitImpl) {
MemberFilter filter;
if (kind == MemberKind.Indexer)
filter = new MemberFilter (MemberCache.IndexerNameAlias, 0, kind, parameters, null);
else
filter = new MemberFilter (MemberName.Name, 0, kind, null, null);
var implementing = MemberCache.FindMember (InterfaceType, filter, BindingRestriction.DeclaredOnly) as PropertySpec;
if (implementing == null)
return;
var accessor = get ? implementing.Get : implementing.Set;
if (accessor != null) {
Report.SymbolRelatedToPreviousError (accessor);
Report.Error (551, Location, "Explicit interface implementation `{0}' is missing accessor `{1}'",
GetSignatureForError (), accessor.GetSignatureForError ());
}
}
}
开发者ID:bbqchickenrobot,项目名称:playscript-mono,代码行数:22,代码来源:property.cs
示例20: DefineBuilders
protected void DefineBuilders (MemberKind kind, ParametersCompiled parameters)
{
PropertyBuilder = Parent.TypeBuilder.DefineProperty (
GetFullName (MemberName), PropertyAttributes.None,
#if !BOOTSTRAP_BASIC // Requires trunk version mscorlib
IsStatic ? 0 : CallingConventions.HasThis,
#endif
MemberType.GetMetaInfo (), null, null,
parameters.GetMetaInfo (), null, null);
PropertySpec spec;
if (kind == MemberKind.Indexer)
spec = new IndexerSpec (Parent.Definition, this, MemberType, parameters, PropertyBuilder, ModFlags);
else
spec = new PropertySpec (kind, Parent.Definition, this, MemberType, PropertyBuilder, ModFlags);
if (Get != null) {
spec.Get = Get.Spec;
var method = Get.Spec.GetMetaInfo () as MethodBuilder;
if (method != null) {
PropertyBuilder.SetGetMethod (method);
Parent.MemberCache.AddMember (this, method.Name, Get.Spec);
}
} else {
CheckMissingAccessor (kind, parameters, true);
}
if (Set != null) {
spec.Set = Set.Spec;
var method = Set.Spec.GetMetaInfo () as MethodBuilder;
if (method != null) {
PropertyBuilder.SetSetMethod (method);
Parent.MemberCache.AddMember (this, method.Name, Set.Spec);
}
} else {
CheckMissingAccessor (kind, parameters, false);
}
Parent.MemberCache.AddMember (this, PropertyBuilder.Name, spec);
}
开发者ID:bbqchickenrobot,项目名称:playscript-mono,代码行数:42,代码来源:property.cs
注:本文中的Mono.CSharp.ParametersCompiled类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论