Exemplo n.º 1
0
        private static void RegisterSecondGroup(IRegisterGroupDefinitions builder)
        {
            builder.Clear();

            var importOnProperty = builder.RegisterObject(typeof(ImportOnProperty));

            var actionOnMethod      = builder.RegisterObject(typeof(ActionOnMethod));
            var conditionOnProperty = builder.RegisterObject(typeof(ConditionOnProperty));

            var registrator = builder.RegisterSchedule();

            {
                var actionVertex = registrator.AddExecutingAction(actionOnMethod.RegisteredActions.First());

                registrator.LinkFromStart(actionVertex, conditionOnProperty.RegisteredConditions.First());
                registrator.LinkToEnd(actionVertex);
                registrator.Register();
            }

            builder.DefineImport(GroupExportName, new List <ImportRegistrationId> {
                importOnProperty.RegisteredImports.First()
            });
            builder.DefineExport(GroupImportName);
            builder.Register(GroupName2);
        }
Exemplo n.º 2
0
        private static void RegisterFirstGroup(IRegisterGroupDefinitions builder)
        {
            builder.Clear();

            var importOnProperty = builder.RegisterObject(typeof(ImportOnProperty));
            var exportOnProperty = builder.RegisterObject(typeof(ExportOnProperty));
            var freeImportOnProperty = builder.RegisterObject(typeof(ImportOnProperty));

            var actionOnMethod = builder.RegisterObject(typeof(ActionOnMethod));
            var conditionOnProperty = builder.RegisterObject(typeof(ConditionOnProperty));
            builder.Connect(importOnProperty.RegisteredImports.First(), exportOnProperty.RegisteredExports.First());

            InsertVertex insertPoint;
            var registrator = builder.RegisterSchedule();
            {
                var actionVertex = registrator.AddExecutingAction(actionOnMethod.RegisteredActions.First());
                insertPoint = registrator.AddInsertPoint();

                registrator.LinkFromStart(actionVertex, conditionOnProperty.RegisteredConditions.First());
                registrator.LinkTo(actionVertex, insertPoint);
                registrator.LinkToEnd(insertPoint);
                registrator.Register();
            }

            builder.DefineExport(GroupExportName);
            builder.DefineImport(
                GroupImportName,
                insertPoint,
                new List<ImportRegistrationId> { freeImportOnProperty.RegisteredImports.First() });

            builder.Register(GroupName1);
        }
Exemplo n.º 3
0
        private static void RegisterSecondGroup(IRegisterGroupDefinitions builder)
        {
            builder.Clear();

            var importOnProperty = builder.RegisterObject(typeof(ImportOnProperty));

            var actionOnMethod = builder.RegisterObject(typeof(ActionOnMethod));
            var conditionOnProperty = builder.RegisterObject(typeof(ConditionOnProperty));

            var registrator = builder.RegisterSchedule();
            {
                var actionVertex = registrator.AddExecutingAction(actionOnMethod.RegisteredActions.First());

                registrator.LinkFromStart(actionVertex, conditionOnProperty.RegisteredConditions.First());
                registrator.LinkToEnd(actionVertex);
                registrator.Register();
            }

            builder.DefineImport(GroupExportName, new List<ImportRegistrationId> { importOnProperty.RegisteredImports.First() });
            builder.DefineExport(GroupImportName);
            builder.Register(GroupName2);
        }
Exemplo n.º 4
0
        private static void RegisterFirstGroup(IRegisterGroupDefinitions builder)
        {
            builder.Clear();

            var importOnProperty     = builder.RegisterObject(typeof(ImportOnProperty));
            var exportOnProperty     = builder.RegisterObject(typeof(ExportOnProperty));
            var freeImportOnProperty = builder.RegisterObject(typeof(ImportOnProperty));

            var actionOnMethod      = builder.RegisterObject(typeof(ActionOnMethod));
            var conditionOnProperty = builder.RegisterObject(typeof(ConditionOnProperty));

            builder.Connect(importOnProperty.RegisteredImports.First(), exportOnProperty.RegisteredExports.First());

            InsertVertex insertPoint;
            var          registrator = builder.RegisterSchedule();

            {
                var actionVertex = registrator.AddExecutingAction(actionOnMethod.RegisteredActions.First());
                insertPoint = registrator.AddInsertPoint();

                registrator.LinkFromStart(actionVertex, conditionOnProperty.RegisteredConditions.First());
                registrator.LinkTo(actionVertex, insertPoint);
                registrator.LinkToEnd(insertPoint);
                registrator.Register();
            }

            builder.DefineExport(GroupExportName);
            builder.DefineImport(
                GroupImportName,
                insertPoint,
                new List <ImportRegistrationId> {
                freeImportOnProperty.RegisteredImports.First()
            });

            builder.Register(GroupName1);
        }