Exemplo n.º 1
0
 private void UpdateDefinedBy(IFinalizedScope scope, IOrType <IInternalMethodDefinition, IImplementationDefinition, IEntryPointDefinition, IBlockDefinition, IRootScope, IObjectDefiniton> owner)
 {
     foreach (var member in scope.Members.Values.Select(x => x.Value))
     {
         definedBy[member] = owner;
     }
 }
Exemplo n.º 2
0
 public void Build(IFinalizedScope scope, IReadOnlyList <IAssignOperation> assignments, IEntryPointDefinition entryPoint)
 {
     buildableScope.Set(scope);
     buildableAssignments.Set(assignments);
     buildableEntryPoint.Set(entryPoint);
     type = InterfaceType.CreateAndBuild(scope.Members.Values.Select(x => MemberDefinition.CreateAndBuild(x.Value.Key, x.Value.Type, x.Value.Access)).ToList());
 }
Exemplo n.º 3
0
 internal void HandleDependencies(IFinalizedScope dependencyScope)
 {
     foreach (var member in dependencyScope.Members.Values.Select(x => x.Value))
     {
         lookup.AddDependency(member);
     }
 }
Exemplo n.º 4
0
 public void Build(ICodeElement left, ICodeElement right, ICodeElement body, IFinalizedScope scope)
 {
     buildableLeft.Set(left);
     buildableRight.Set(right);
     buildableBody.Set(body);
     buildableScope.Set(scope);
 }
Exemplo n.º 5
0
 public static IModuleDefinition CreateAndBuild(IFinalizedScope scope, IReadOnlyList <ICodeElement> staticInitialization, IKey key)
 {
     var(x, y) = Create();
     y.Build(scope, staticInitialization, key);
     return(x);
 }
Exemplo n.º 6
0
 public void Build(IFinalizedScope scope, IReadOnlyList <ICodeElement> staticInitialization, IKey key)
 {
     buildableScope.Set(scope);
     buildableStaticInitialization.Set(staticInitialization);
     buildableKey.Set(key);
 }
Exemplo n.º 7
0
 public static IRootScope CreateAndBuild(IFinalizedScope scope, IReadOnlyList <IAssignOperation> assignments, IEntryPointDefinition entryPoint)
 {
     var(x, y) = Create();
     y.Build(scope, assignments, entryPoint);
     return(x);
 }
Exemplo n.º 8
0
 public static IObjectDefiniton CreateAndBuild(IFinalizedScope scope, IReadOnlyList <IAssignOperation> assignments, IInterfaceType interfaceType)
 {
     var(x, y) = Create();
     y.Build(scope, assignments, interfaceType);
     return(x);
 }
Exemplo n.º 9
0
        //public IReadOnlyList<GenericTypeEntry> GenericTypes => genericTypes.SelectMany(x=> x.Value.Select(y=> new GenericTypeEntry(y, new GenericKeyDefinition(x.Key,y.TypeParameterKeys)))).ToList();

        //IReadOnlyList<TypeEntry> IFinalizedScope.Types => types.Select(x => new TypeEntry(x.Key, x.Value)).ToList();

        public static (IFinalizedScope, IFinalizedScopeBuilder) Create(IFinalizedScope parent)
        {
            var res = new Scope(parent);

            return(res, res);
        }
Exemplo n.º 10
0
 public void Build(IFinalizedScope scope, IEnumerable <IAssignOperation> assignments)
 {
     buildableScope.Set(scope);
     buildableAssignments.Set(assignments);
 }
Exemplo n.º 11
0
 public static IInterfaceModuleType ToVerifiableType(this IFinalizedScope scope) => scope.Members.Select(x => (x.Key, x.Type)).ToArray().ToVerifiableType();
Exemplo n.º 12
0
 internal static IInterpetedScope InstanceScope(IInterpetedStaticScope staticBacking,
                                                IFinalizedScope scopeDefinition)
 => new RunTimeAnyRoot(new Func <IRunTimeAnyRoot, RunTimeAnyRootEntry>[] { InstanceScopeIntention(staticBacking, scopeDefinition, scopeDefinition.ToVerifiableType()) }).Has <IInterpetedScope>();
Exemplo n.º 13
0
 public InterpetedScopeTemplate(IFinalizedScope finalizedScope, IInterfaceModuleType type)
 {
     this.staticScope    = TypeManager.StaticScope(new ConcurrentIndexed <IKey, IInterpetedMember>(), type);
     this.finalizedScope = finalizedScope ?? throw new ArgumentNullException(nameof(finalizedScope));
 }
Exemplo n.º 14
0
 public static ITryAssignOperation CreateAndBuild(ICodeElement left, ICodeElement right, ICodeElement body, IFinalizedScope scope)
 {
     var(x, y) = Create();
     y.Build(left, right, body, scope);
     return(x);
 }
Exemplo n.º 15
0
 public static IFinalizedScope CreateAndBuild(IReadOnlyList <IsStatic> toAdd, IFinalizedScope parent)
 {
     var(x, y) = Create(parent);
     y.Build(toAdd);
     return(x);
 }
Exemplo n.º 16
0
 public static IObjectDefiniton CreateAndBuild(IFinalizedScope scope, IEnumerable <IAssignOperation> assignments)
 {
     var(x, y) = Create();
     y.Build(scope, assignments);
     return(x);
 }
Exemplo n.º 17
0
 public Scope(IFinalizedScope parent)
 {
     this.parent = parent ?? throw new ArgumentNullException(nameof(parent));
 }
Exemplo n.º 18
0
 public Project(IRootScope rootScope, IReadOnlyList <TAssembly> references, IFinalizedScope dependencyScope)
 {
     RootScope       = rootScope ?? throw new ArgumentNullException(nameof(rootScope));
     References      = references ?? throw new ArgumentNullException(nameof(references));
     DependencyScope = dependencyScope ?? throw new ArgumentNullException(nameof(dependencyScope));
 }
Exemplo n.º 19
0
 public Assembly(IKey key, IFinalizedScope scope, InterpetedAssemblyBacking backing)
 {
     Key          = key ?? throw new ArgumentNullException(nameof(key));
     Scope        = scope ?? throw new ArgumentNullException(nameof(scope));
     this.Backing = backing ?? throw new ArgumentNullException(nameof(backing));
 }
Exemplo n.º 20
0
 public void Build(IFinalizedScope scope, IReadOnlyList <IAssignOperation> assignments, IInterfaceType interfaceType)
 {
     buildableScope.Set(scope);
     buildableAssignments.Set(assignments);
     type = interfaceType;
 }