internal void ConditionalRemove(IIntermediateTypeParent parent) { this._RemoveSet(from element in this let intermediateItem = element.Value.Entry as IIntermediateType where intermediateItem != null && intermediateItem.Parent == parent select element.Key); }
/// <summary> /// Creates a new <see cref="IntermediateTypeBase{TTypeIdentifier, TType, TIntermediateType}"/> /// with the <paramref name="parent"/> /// provided. /// </summary> /// <param name="parent">The <see cref="IIntermediateTypeParent"/> /// which conatins the <see cref="IntermediateTypeBase{TTypeIdentifier, TType, TIntermediateType}"/></param> /// <exception cref="System.ArgumentNullException">thrown when <paramref name="parent"/> /// is null.</exception> public IntermediateTypeBase(IIntermediateTypeParent parent) { if (parent == null) { throw new ArgumentNullException("parent"); } this.parent = parent; }
public MyComputerClass(IIntermediateTypeParent parent) : base("MyComputer", parent) { this.Metadata.Add(new MetadatumDefinitionParameterValueCollection(CommonVBTypeRefs.GetCommonTypeRefs((ICliManager)this.IdentityManager).GeneratedCodeAttribute) { "MyTemplate", this.Assembly.Provider.Version.GetStringVersion() }); }
protected void TranslateTypeParent(IIntermediateTypeParent parent) { this.TranslateTypes(parent.Classes); this.TranslateTypes(parent.Delegates); this.TranslateTypes(parent.Enums); this.TranslateTypes(parent.Interfaces); this.TranslateTypes(parent.Structs); }
public int GetCountFor(IIntermediateTypeParent parent) { int result = 0; foreach (var element in this.Values) { if (element.Parent == parent) { result++; } } return(result); }
/// <summary> /// Creates a new <see cref="IntermediateTypeBase{TTypeIdentifier, TType, TIntermediateType}"/> /// with the <paramref name="name"/> and <paramref name="parent"/> /// provided. /// </summary> /// <param name="name">The <see cref="String"/> representing the type's name.</param> /// <param name="parent">The <see cref="IIntermediateTypeParent"/> /// which conatins the <see cref="IntermediateTypeBase{TTypeIdentifier, TType, TIntermediateType}"/></param> /// <exception cref="System.ArgumentNullException">thrown when <paramref name="name"/> /// or <paramref name="parent"/> is null.</exception> /// <exception cref="System.ArgumentException">thrown when <paramref name="name"/> is /// <see cref="String.Empty"/>.</exception> public IntermediateTypeBase(string name, IIntermediateTypeParent parent) : this(parent) { if (name == null) { throw new ArgumentNullException("name"); } if (name == string.Empty) { throw new ArgumentException("name"); } this.name = name; }
private void VisitTypeParent(IIntermediateTypeParent typeParent, DefaultAssemblyFilenameVisitorContext context) { if (context.CurrentResult != null) { return; } foreach (var @class in typeParent.Classes.ExclusivelyOnParent()) { if (context.CurrentResult != null) { return; } @class.Value.Accept(this, context); } foreach (var @delegate in typeParent.Delegates.ExclusivelyOnParent()) { if (context.CurrentResult != null) { return; } @delegate.Value.Accept(this, context); } foreach (var @enum in typeParent.Enums.ExclusivelyOnParent()) { if (context.CurrentResult != null) { return; } @enum.Value.Accept(this, context); } foreach (var @interface in typeParent.Interfaces.ExclusivelyOnParent()) { if (context.CurrentResult != null) { return; } @interface.Value.Accept(this, context); } foreach (var @struct in typeParent.Structs.ExclusivelyOnParent()) { if (context.CurrentResult != null) { return; } @struct.Value.Accept(this, context); } }
public override void Dispose() { try { if (this._metadata != null) { this._metadata.Dispose(); this._metadata = null; } this.parent = null; this.name = null; this.declaringModule = null; } finally { this.isDisposed = 1; base.Dispose(); } }
public static CharStreamClass CreateBitStream(IIntermediateTypeParent parent, IIntermediateCliManager identityManager) { IIntermediateClassType result = parent.Classes.Add("CharStream"); result.AccessLevel = AccessLevelModifiers.Internal; IIntermediateClassFieldMember charBuffer = result.Fields.Add(new TypedName("buffer", identityManager.ObtainTypeReference(RuntimeCoreType.Char).MakeArray())); charBuffer.AccessLevel = AccessLevelModifiers.Internal; IIntermediateClassFieldMember charBufferSize = result.Fields.Add(new TypedName("actualSize", identityManager.ObtainTypeReference(RuntimeCoreType.Int32))); charBufferSize.AccessLevel = AccessLevelModifiers.Internal; charBufferSize.InitializationExpression = IntermediateGateway.NumberZero; var purgeMethod = AddPurgeMethod(result, charBufferSize, identityManager); var growBufferMethod = AddGrowBufferMethod(result, charBufferSize, charBuffer, identityManager); var pushStringMethod = AddPushStringMethod(result, charBufferSize, charBuffer, growBufferMethod, identityManager); var toStringMethod = AddToStringMethod(result, charBufferSize, charBuffer, identityManager); var pushCharMethod = AddPushMethod(result, charBufferSize, charBuffer, growBufferMethod, identityManager); return(new CharStreamClass(result, charBuffer, charBufferSize, purgeMethod, pushStringMethod, pushCharMethod, toStringMethod, growBufferMethod)); }
public int GetCountFor(IIntermediateTypeParent parent) { int result = 0; foreach (var element in this.Values) { if (element.Entry.Parent == parent) { result++; } else if (element.Entry is IIntermediateSegmentableType) { IIntermediateSegmentableType segType = (IIntermediateSegmentableType)element.Entry; foreach (IIntermediateType part in segType.Parts) { if (part.Parent == parent) { result++; } } } } return(result); }
/// <summary> /// Creates a new <see cref="IntermediateEnumType"/> with the /// <paramref name="name"/> and <paramref name="parent"/> /// provided. /// </summary> /// <param name="name">The <see cref="String"/> value denoting /// the unique name of the <see cref="IntermediateEnumType"/>.</param> /// <param name="parent">The <see cref="IIntermediateTypeParent"/> which /// contains the <see cref="IntermediateEnumType"/>.</param> /// <exception cref="System.ArgumentNullException">thrown when <paramref name="name"/> /// or <paramref name="parent"/> is null.</exception> /// <exception cref="System.ArgumentException">thrown when <paramref name="name"/> is /// <see cref="String.Empty"/>.</exception> protected internal IntermediateEnumType(string name, IIntermediateTypeParent parent) : base(name, parent) { }
public IntermediateInterfaceTypeDictionary(IIntermediateTypeParent parent, IntermediateFullTypeDictionary master, IntermediateInterfaceTypeDictionary root) : base(parent, master, root) { }
public IIntermediateStructType New(string name, IIntermediateTypeParent parent) { return(new IntermediateCliStructType(name, parent)); }
public IIntermediateDelegateType New(string name, IIntermediateTypeParent parent) { return(new IntermediateCliDelegateType(name, parent)); }
internal protected IntermediateCliClassType(IIntermediateTypeParent parent) : base(parent) { }
internal protected IntermediateCliStructType(TInstanceIntermediateType root, IIntermediateTypeParent parent) : base(root, parent) { }
internal protected IntermediateCliStructType(IIntermediateTypeParent parent) : base(parent) { }
/// <summary> /// Creates a new <see cref="IntermediateClassType"/> with the /// <paramref name="root"/> and <paramref name="parent"/> provided. /// </summary> /// <param name="root">The <see cref="IntermediateClassType"/> which is the root instance /// of the series of <see cref="IntermediateClassType"/>.</param> /// <param name="parent">The <see cref="IntermediateClassType"/> which contains the /// newly created <see cref="IntermediateClassType"/> instance.</param> /// <returns>A new <see cref="IntermediateClassType"/> as a partial of the <paramref name="root"/> /// instance and a child of the <paramref name="parent"/>.</returns> protected override IntermediateClassType GetNewPartial(IntermediateClassType root, IIntermediateTypeParent parent) { return(new IntermediateClassType(root, parent)); }
/// <summary> /// Creates a new <see cref="IntermediateClassType"/> with the /// <see cref="IIntermediateTypeParent"/>. /// </summary> /// <param name="parent">The <see cref="IIntermediateTypeParent"/></param> public IntermediateClassType(IIntermediateTypeParent parent) : base(parent) { }
/// <summary> /// Creates a new <see cref="IntermediateClassType"/> partial instance with the /// <paramref name="root"/> instance and the <paramref name="parent"/> which contains /// the new partial instance. /// </summary> /// <param name="root">The <see cref="IntermediateClassType"/> which roots the /// <see cref="IntermediateClassType"/>.</param> /// <param name="parent">The <see cref="IIntermediateTypeParent"/> which contains the new /// partial instance.</param> public IntermediateClassType(IntermediateClassType root, IIntermediateTypeParent parent) : base(root, parent) { }
/// <summary> /// Creates a new <see cref="IntermediateClassType"/> with the /// <paramref name="name"/> and <paramref name="parent"/> /// provided. /// </summary> /// <param name="name">The <see cref="System.String"/> which represents the /// <see cref="IntermediateClassType"/>'s name.</param> /// <param name="parent">The <see cref="IIntermediateTypeParent"/> which contains the /// <see cref="IntermediateClassType"/>.</param> public IntermediateClassType(string name, IIntermediateTypeParent parent) : base(name, parent) { }
internal protected IntermediateDelegateType(string name, IIntermediateTypeParent parent) : base(name, parent) { this.returnType = this.Parent.IdentityManager.ObtainTypeReference(RuntimeCoreType.VoidType); }
internal protected IntermediateCliStructType(string name, IIntermediateTypeParent parent) : base(name, parent) { }
public IntermediateTypeDictionary(IIntermediateTypeParent parent, IntermediateFullTypeDictionary master, IntermediateTypeDictionary <TTypeIdentifier, TType, TIntermediateType> root) : base(master, root) { this.parent = parent; }
public IIntermediateClassType New(string name, IIntermediateTypeParent parent) { return(new MyVisualBasicClass(name, parent)); }
private MyComputerClass(MyComputerClass root, IIntermediateTypeParent parent) : base(root, parent) { }
public IntermediateTypeDictionary(IIntermediateTypeParent parent, IntermediateFullTypeDictionary master) : base(master) { this.parent = parent; }
private MyApplicationClass(MyApplicationClass root, IIntermediateTypeParent parent) : base(root, parent) { }
protected override AnonymousType GetNewPartial(AnonymousType root, IIntermediateTypeParent parent) { return(null); }
protected override MyApplicationClass GetNewPartial(MyApplicationClass root, IIntermediateTypeParent parent) { return(new MyApplicationClass(root, parent)); }