private CilBodyMerger(ContextImpl context, Importer importer, TypeMapping tm, MethodDef sourceMethod,
                       MethodDef targetMethod)
     : base(context, importer)
 {
     _sourceMethod = sourceMethod;
     _targetMethod = targetMethod;
     _tm           = tm;
     _instrMap     = new Dictionary <Instruction, Instruction>();
     _event        = new NetfuserEvent.CilBodyBuilding(context, _tm, _sourceMethod, _targetMethod, Importer, _instrMap);
 }
Beispiel #2
0
 private TypeMerger(ContextImpl context, Importer importer, TypeMapping tm, bool merge)
     : base(context, importer)
 {
     _tm         = tm;
     _merge      = merge;
     _fields     = new List <Tuple <FieldDef, FieldDef> >();
     _methods    = new List <Tuple <MethodDef, MethodDef> >();
     _properties = new List <Tuple <PropertyDef, PropertyDef> >();
     _events     = new List <Tuple <EventDef, EventDef> >();
     _checkAdjustFamorassemMethods = new List <MethodDef>();
 }
Beispiel #3
0
        static void Initialize()
        {
            main_form = new SWF.Form();
            main_form.FormBorderStyle = SWF.FormBorderStyle.FixedSingle;
            main_form.MaximizeBox     = false;
            main_form.MinimizeBox     = false;
            main_form.ClientSize      = device_config.Size;
            main_form.Name            = "XobotOS";
            main_form.Text            = "XobotOS";

            control = new XobotControl();

            system_thread = ActivityThread.systemMain();
            ContextImpl context = system_thread.getSystemContext();

            package_manager = (XobotPackageManager)context.getPackageManager();
        }
Beispiel #4
0
 internal static TypeMerger Create(ContextImpl context, TypeMapping tm, bool merge) =>
 new TypeMerger(context, context.GetImporter(tm.Target), tm, merge);
Beispiel #5
0
 public Logger(params ILoggerEndpoint[] endpoints)
 {
     Endpoints = endpoints?.ToList() ?? throw new ArgumentNullException(nameof(endpoints));
     ctx       = new ContextImpl(this);
 }
Beispiel #6
0
 protected BaseMerger(ContextImpl context, Importer importer)
 {
     Context  = context;
     Importer = importer;
 }
Beispiel #7
0
 /// <summary>
 /// 用于创建modelBuilder
 /// </summary>
 /// <param name="modelBuilder"></param>
 protected internal virtual void DoRegisterTypes(ModelBuilder modelBuilder)
 {
     //TODO Dmn类型注册
     try
     {
         AllowedAnswersImpl.RegisterType(modelBuilder);
         AllowedValuesImpl.RegisterType(modelBuilder);
         ArtifactImpl.RegisterType(modelBuilder);
         AssociationImpl.RegisterType(modelBuilder);
         AuthorityRequirementImpl.RegisterType(modelBuilder);
         BindingImpl.RegisterType(modelBuilder);
         BusinessContextElementImpl.RegisterType(modelBuilder);
         BusinessKnowledgeModelImpl.RegisterType(modelBuilder);
         ColumnImpl.RegisterType(modelBuilder);
         ContextEntryImpl.RegisterType(modelBuilder);
         ContextImpl.RegisterType(modelBuilder);
         DecisionImpl.RegisterType(modelBuilder);
         DecisionMadeReferenceImpl.RegisterType(modelBuilder);
         DecisionMakerReferenceImpl.RegisterType(modelBuilder);
         DecisionOwnedReferenceImpl.RegisterType(modelBuilder);
         DecisionOwnerReferenceImpl.RegisterType(modelBuilder);
         DecisionRuleImpl.RegisterType(modelBuilder);
         DecisionServiceImpl.RegisterType(modelBuilder);
         DecisionTableImpl.RegisterType(modelBuilder);
         DefaultOutputEntryImpl.RegisterType(modelBuilder);
         DefinitionsImpl.RegisterType(modelBuilder);
         DescriptionImpl.RegisterType(modelBuilder);
         DmnElementImpl.RegisterType(modelBuilder);
         DmnElementReferenceImpl.RegisterType(modelBuilder);
         DrgElementImpl.RegisterType(modelBuilder);
         DrgElementReferenceImpl.RegisterType(modelBuilder);
         ElementCollectionImpl.RegisterType(modelBuilder);
         EncapsulatedDecisionReferenceImpl.RegisterType(modelBuilder);
         EncapsulatedLogicImpl.RegisterType(modelBuilder);
         ExpressionImpl.RegisterType(modelBuilder);
         ExtensionElementsImpl.RegisterType(modelBuilder);
         FormalParameterImpl.RegisterType(modelBuilder);
         FunctionDefinitionImpl.RegisterType(modelBuilder);
         ImpactedPerformanceIndicatorReferenceImpl.RegisterType(modelBuilder);
         ImpactingDecisionReferenceImpl.RegisterType(modelBuilder);
         ImportImpl.RegisterType(modelBuilder);
         ImportedElementImpl.RegisterType(modelBuilder);
         ImportedValuesImpl.RegisterType(modelBuilder);
         InformationItemImpl.RegisterType(modelBuilder);
         InformationRequirementImpl.RegisterType(modelBuilder);
         InputImpl.RegisterType(modelBuilder);
         InputClauseImpl.RegisterType(modelBuilder);
         InputDataImpl.RegisterType(modelBuilder);
         InputDataReferenceImpl.RegisterType(modelBuilder);
         InputDecisionReferenceImpl.RegisterType(modelBuilder);
         InputEntryImpl.RegisterType(modelBuilder);
         InputExpressionImpl.RegisterType(modelBuilder);
         InputValuesImpl.RegisterType(modelBuilder);
         InvocationImpl.RegisterType(modelBuilder);
         ItemComponentImpl.RegisterType(modelBuilder);
         ItemDefinitionImpl.RegisterType(modelBuilder);
         ItemDefinitionReferenceImpl.RegisterType(modelBuilder);
         KnowledgeRequirementImpl.RegisterType(modelBuilder);
         KnowledgeSourceImpl.RegisterType(modelBuilder);
         ListImpl.RegisterType(modelBuilder);
         LiteralExpressionImpl.RegisterType(modelBuilder);
         ModelElementInstanceImpl.RegisterType(modelBuilder);
         NamedElementImpl.RegisterType(modelBuilder);
         OrganizationUnitImpl.RegisterType(modelBuilder);
         OutputImpl.RegisterType(modelBuilder);
         OutputClauseImpl.RegisterType(modelBuilder);
         OutputDecisionReferenceImpl.RegisterType(modelBuilder);
         OutputEntryImpl.RegisterType(modelBuilder);
         OutputValuesImpl.RegisterType(modelBuilder);
         OwnerReferenceImpl.RegisterType(modelBuilder);
         ParameterReferenceImpl.RegisterType(modelBuilder);
         PerformanceIndicatorImpl.RegisterType(modelBuilder);
         QuestionImpl.RegisterType(modelBuilder);
         RelationImpl.RegisterType(modelBuilder);
         RequiredAuthorityReferenceImpl.RegisterType(modelBuilder);
         RequiredDecisionReferenceImpl.RegisterType(modelBuilder);
         RequiredInputReferenceImpl.RegisterType(modelBuilder);
         RequiredKnowledgeReferenceImpl.RegisterType(modelBuilder);
         RowImpl.RegisterType(modelBuilder);
         RuleImpl.RegisterType(modelBuilder);
         SourceRefImpl.RegisterType(modelBuilder);
         SupportedObjectiveReferenceImpl.RegisterType(modelBuilder);
         TargetRefImpl.RegisterType(modelBuilder);
         TextImpl.RegisterType(modelBuilder);
         TextAnnotationImpl.RegisterType(modelBuilder);
         TypeImpl.RegisterType(modelBuilder);
         TypeRefImpl.RegisterType(modelBuilder);
         UnaryTestsImpl.RegisterType(modelBuilder);
         UsingProcessReferenceImpl.RegisterType(modelBuilder);
         UsingTaskReferenceImpl.RegisterType(modelBuilder);
         VariableImpl.RegisterType(modelBuilder);
     }
     catch (System.Exception ex)
     {
         throw ex;
     }
     /// <summary>
     /// camunda extensions </summary>
 }
        /// <summary>
        /// Creates and starts a new context.
        /// </summary>
        /// <param name="transactionScopeOption">
        /// The transaction scope option.
        /// </param>
        /// <param name="transactionOptions">
        /// The transaction options.
        /// </param>
        /// <returns>
        /// The <see cref="IContext"/>.
        /// </returns>
        public IContext StartNewContext(TransactionScopeOption transactionScopeOption, TransactionOptions transactionOptions)
        {
            if (!this.IsReady)
            {
                throw new SlarshException(Resources.CannotCreateContextIfFactoryNotStarted);
            }

            var context = new ContextImpl(this);
            context.Start(transactionScopeOption, transactionOptions);
            ContextFactory.SetCurrentContext(context);
            return context;
        }
Beispiel #9
0
 private ModuleMerger(ContextImpl context, Importer importer, ModuleDef source)
     : base(context, importer)
 {
     _source = source;
 }
Beispiel #10
0
 internal static ModuleMerger Create(ContextImpl context, ModuleDef source)
 {
     return(new ModuleMerger(context, context.BasicImporter, source));
 }
 internal static CilBodyMerger Create(ContextImpl context, TypeMapping tm, MethodDef sourceMethod,
                                      MethodDef targetMethod) =>
 new CilBodyMerger(context, context.GetImporter(tm.Target, targetMethod), tm, sourceMethod,
                   targetMethod);
Beispiel #12
0
 internal XobotPackageManager(ContextImpl context)
 {
     this.context    = context;
     loaded_packages = new SCG.Dictionary <string, XobotPackageInfo> ();
 }