public void Initialize()
 {
     KnownTypesBinder.AddKnownType(typeof(AndRuleNode));
     KnownTypesBinder.AddKnownType(typeof(BooleanRuleNode));
     KnownTypesBinder.AddKnownType(typeof(ComparisonOperator));
     KnownTypesBinder.AddKnownType(typeof(ComparisonRuleNode));
     KnownTypesBinder.AddKnownType(typeof(CrossTrustBoundaryRuleNode));
     KnownTypesBinder.AddKnownType(typeof(EnumValueRuleNode));
     KnownTypesBinder.AddKnownType(typeof(NaryRuleNode));
     KnownTypesBinder.AddKnownType(typeof(NotRuleNode));
     KnownTypesBinder.AddKnownType(typeof(OrRuleNode));
     KnownTypesBinder.AddKnownType(typeof(SelectionRule));
     KnownTypesBinder.AddKnownType(typeof(SelectionRuleNode));
     KnownTypesBinder.AddKnownType(typeof(UnaryRuleNode));
     KnownTypesBinder.AddKnownType(typeof(MitigationSelectionRule));
     KnownTypesBinder.AddKnownType(typeof(HasIncomingRuleNode));
     KnownTypesBinder.AddKnownType(typeof(HasOutgoingRuleNode));
     KnownTypesBinder.AddKnownType(typeof(TruismRuleNode));
     KnownTypesBinder.AddKnownType(typeof(EntityTemplateRuleNode));
     KnownTypesBinder.AddKnownType(typeof(ExternalInteractorTemplateRuleNode));
     KnownTypesBinder.AddKnownType(typeof(ProcessTemplateRuleNode));
     KnownTypesBinder.AddKnownType(typeof(DataStoreTemplateRuleNode));
     KnownTypesBinder.AddKnownType(typeof(FlowTemplateRuleNode));
     KnownTypesBinder.AddKnownType(typeof(TrustBoundaryTemplateRuleNode));
 }
示例#2
0
        private void InitializeEngineKnownTypes()
        {
            KnownTypesBinder.AddKnownType(typeof(bool));
            KnownTypesBinder.AddKnownType(typeof(string));
            KnownTypesBinder.AddKnownType(typeof(int));
            KnownTypesBinder.AddKnownType(typeof(decimal));
            KnownTypesBinder.AddKnownType(typeof(System.Drawing.PointF));

            InitializeKnownTypes(Assembly.GetExecutingAssembly());
        }
示例#3
0
 public void Initialize()
 {
     KnownTypesBinder.AddKnownType(typeof(FalsePositiveList));
     KnownTypesBinder.AddKnownType(typeof(FalsePositiveInfo));
     KnownTypesBinder.AddKnownType(typeof(Annotation));
     KnownTypesBinder.AddKnownType(typeof(AnnotationAnswer));
     KnownTypesBinder.AddKnownType(typeof(TopicToBeClarified));
     KnownTypesBinder.AddKnownType(typeof(Question));
     KnownTypesBinder.AddKnownType(typeof(Highlight));
     KnownTypesBinder.AddKnownType(typeof(ReviewNote));
 }
示例#4
0
        private void InitializeKnownTypes([NotNull] Type type)
        {
            if (type.GetCustomAttributes <JsonObjectAttribute>().Any())
            {
                KnownTypesBinder.AddKnownType(type);

                var interfaces = type.GetInterfaces();

                foreach (var i in interfaces)
                {
                    KnownTypesBinder.AddKnownType(i);
                }
            }
        }
        public void Initialize()
        {
            KnownTypesBinder.AddKnownType(typeof(MitigationSelectionRule));

            var assemblyName = Assembly.GetExecutingAssembly().GetName().Name;

            KnownTypesBinder.AddEquivalence(assemblyName, "ThreatsManager.AutoThreatGeneration.Engine.AndRuleNode",
                                            typeof(ThreatsManager.AutoGenRules.Engine.AndRuleNode));
            KnownTypesBinder.AddEquivalence(assemblyName, "ThreatsManager.AutoThreatGeneration.Engine.BooleanRuleNode",
                                            typeof(ThreatsManager.AutoGenRules.Engine.BooleanRuleNode));
            KnownTypesBinder.AddEquivalence(assemblyName, "ThreatsManager.AutoThreatGeneration.Engine.ComparisonOperator",
                                            typeof(ThreatsManager.AutoGenRules.Engine.ComparisonOperator));
            KnownTypesBinder.AddEquivalence(assemblyName, "ThreatsManager.AutoThreatGeneration.Engine.ComparisonRuleNode",
                                            typeof(ThreatsManager.AutoGenRules.Engine.ComparisonRuleNode));
            KnownTypesBinder.AddEquivalence(assemblyName, "ThreatsManager.AutoThreatGeneration.Engine.CrossTrustBoundaryRuleNode",
                                            typeof(ThreatsManager.AutoGenRules.Engine.CrossTrustBoundaryRuleNode));
            KnownTypesBinder.AddEquivalence(assemblyName, "ThreatsManager.AutoThreatGeneration.Engine.EnumValueRuleNode",
                                            typeof(ThreatsManager.AutoGenRules.Engine.EnumValueRuleNode));
            KnownTypesBinder.AddEquivalence(assemblyName, "ThreatsManager.AutoThreatGeneration.Engine.NaryRuleNode",
                                            typeof(ThreatsManager.AutoGenRules.Engine.NaryRuleNode));
            KnownTypesBinder.AddEquivalence(assemblyName, "ThreatsManager.AutoThreatGeneration.Engine.NotRuleNode",
                                            typeof(ThreatsManager.AutoGenRules.Engine.NotRuleNode));
            KnownTypesBinder.AddEquivalence(assemblyName, "ThreatsManager.AutoThreatGeneration.Engine.OrRuleNode",
                                            typeof(ThreatsManager.AutoGenRules.Engine.OrRuleNode));
            KnownTypesBinder.AddEquivalence(assemblyName, "ThreatsManager.AutoThreatGeneration.Engine.SelectionRule",
                                            typeof(ThreatsManager.AutoGenRules.Engine.SelectionRule));
            KnownTypesBinder.AddEquivalence(assemblyName, "ThreatsManager.AutoThreatGeneration.Engine.SelectionRuleNode",
                                            typeof(ThreatsManager.AutoGenRules.Engine.SelectionRuleNode));
            KnownTypesBinder.AddEquivalence(assemblyName, "ThreatsManager.AutoThreatGeneration.Engine.UnaryRuleNode",
                                            typeof(ThreatsManager.AutoGenRules.Engine.UnaryRuleNode));
            KnownTypesBinder.AddEquivalence(assemblyName, "ThreatsManager.AutoThreatGeneration.Engine.HasIncomingRuleNode",
                                            typeof(ThreatsManager.AutoGenRules.Engine.HasIncomingRuleNode));
            KnownTypesBinder.AddEquivalence(assemblyName, "ThreatsManager.AutoThreatGeneration.Engine.HasOutgoingRuleNode",
                                            typeof(ThreatsManager.AutoGenRules.Engine.HasOutgoingRuleNode));
            KnownTypesBinder.AddEquivalence(assemblyName, "ThreatsManager.AutoThreatGeneration.Engine.TruismRuleNode",
                                            typeof(ThreatsManager.AutoGenRules.Engine.TruismRuleNode));
            KnownTypesBinder.AddEquivalence(assemblyName, "ThreatsManager.AutoThreatGeneration.Engine.EntityTemplateRuleNode",
                                            typeof(ThreatsManager.AutoGenRules.Engine.EntityTemplateRuleNode));
            KnownTypesBinder.AddEquivalence(assemblyName, "ThreatsManager.AutoThreatGeneration.Engine.ExternalInteractorTemplateRuleNode",
                                            typeof(ThreatsManager.AutoGenRules.Engine.ExternalInteractorTemplateRuleNode));
            KnownTypesBinder.AddEquivalence(assemblyName, "ThreatsManager.AutoThreatGeneration.Engine.ProcessTemplateRuleNode",
                                            typeof(ThreatsManager.AutoGenRules.Engine.ProcessTemplateRuleNode));
            KnownTypesBinder.AddEquivalence(assemblyName, "ThreatsManager.AutoThreatGeneration.Engine.DataStoreTemplateRuleNode",
                                            typeof(ThreatsManager.AutoGenRules.Engine.DataStoreTemplateRuleNode));
            KnownTypesBinder.AddEquivalence(assemblyName, "ThreatsManager.AutoThreatGeneration.Engine.FlowTemplateRuleNode",
                                            typeof(ThreatsManager.AutoGenRules.Engine.FlowTemplateRuleNode));
            KnownTypesBinder.AddEquivalence(assemblyName, "ThreatsManager.AutoThreatGeneration.Engine.TrustBoundaryTemplateRuleNode",
                                            typeof(ThreatsManager.AutoGenRules.Engine.TrustBoundaryTemplateRuleNode));
        }
示例#6
0
 public void Initialize()
 {
     KnownTypesBinder.AddKnownType(typeof(DevOpsInfo));
     KnownTypesBinder.AddKnownType(typeof(DevOpsConnectionInfo));
     KnownTypesBinder.AddKnownType(typeof(DevOpsWorkItemConnectionInfo));
     KnownTypesBinder.AddKnownType(typeof(DevOpsConnection));
     KnownTypesBinder.AddKnownType(typeof(DevOpsWorkItemStateMapping));
     KnownTypesBinder.AddKnownType(typeof(DevOpsFieldMapping));
     KnownTypesBinder.AddKnownType(typeof(DevOpsItemInfo));
     KnownTypesBinder.AddKnownType(typeof(ReviewInfo));
     KnownTypesBinder.AddKnownType(typeof(Iteration));
     KnownTypesBinder.AddKnownType(typeof(Iterations));
     KnownTypesBinder.AddKnownType(typeof(IterationRisk));
     KnownTypesBinder.AddKnownType(typeof(IterationInfo));
 }
示例#7
0
 public void Initialize()
 {
     KnownTypesBinder.AddKnownType(typeof(AndRuleNode));
     KnownTypesBinder.AddKnownType(typeof(BooleanRuleNode));
     KnownTypesBinder.AddKnownType(typeof(ComparisonOperator));
     KnownTypesBinder.AddKnownType(typeof(ComparisonRuleNode));
     KnownTypesBinder.AddKnownType(typeof(CrossTrustBoundaryRuleNode));
     KnownTypesBinder.AddKnownType(typeof(EnumValueRuleNode));
     KnownTypesBinder.AddKnownType(typeof(NaryRuleNode));
     KnownTypesBinder.AddKnownType(typeof(NotRuleNode));
     KnownTypesBinder.AddKnownType(typeof(OrRuleNode));
     KnownTypesBinder.AddKnownType(typeof(SelectionRule));
     KnownTypesBinder.AddKnownType(typeof(SelectionRuleNode));
     KnownTypesBinder.AddKnownType(typeof(UnaryRuleNode));
     KnownTypesBinder.AddKnownType(typeof(MitigationSelectionRule));
     KnownTypesBinder.AddKnownType(typeof(HasIncomingRuleNode));
     KnownTypesBinder.AddKnownType(typeof(HasOutgoingRuleNode));
     KnownTypesBinder.AddKnownType(typeof(TruismRuleNode));
 }
 public void Initialize()
 {
     KnownTypesBinder.AddKnownType(typeof(Fact));
     KnownTypesBinder.AddKnownType(typeof(FactContainer));
     KnownTypesBinder.AddKnownType(typeof(FactHardNumber));
     KnownTypesBinder.AddKnownType(typeof(FactProbRange));
     KnownTypesBinder.AddKnownType(typeof(FactRange));
     KnownTypesBinder.AddKnownType(typeof(ContactFrequency));
     KnownTypesBinder.AddKnownType(typeof(Estimation));
     KnownTypesBinder.AddKnownType(typeof(FactBased));
     KnownTypesBinder.AddKnownType(typeof(Frequency));
     KnownTypesBinder.AddKnownType(typeof(Loss));
     KnownTypesBinder.AddKnownType(typeof(LossEventFrequency));
     KnownTypesBinder.AddKnownType(typeof(LossMagnitude));
     KnownTypesBinder.AddKnownType(typeof(Magnitude));
     KnownTypesBinder.AddKnownType(typeof(Probability));
     KnownTypesBinder.AddKnownType(typeof(Risk));
     KnownTypesBinder.AddKnownType(typeof(ThreatEventFrequency));
     KnownTypesBinder.AddKnownType(typeof(Vulnerability));
     KnownTypesBinder.AddKnownType(typeof(Threshold));
     KnownTypesBinder.AddKnownType(typeof(Thresholds));
 }
 public void Initialize()
 {
     KnownTypesBinder.AddKnownType(typeof(Annotations.Annotations));
     KnownTypesBinder.AddKnownType(typeof(CalculatedSeverityConfiguration));
 }
示例#10
0
 public void Initialize()
 {
     KnownTypesBinder.AddKnownType(typeof(DefinitionContainer));
 }
 public void Initialize()
 {
     KnownTypesBinder.AddKnownType(typeof(FalsePositiveList));
     KnownTypesBinder.AddKnownType(typeof(FalsePositiveInfo));
 }
示例#12
0
 public void Initialize()
 {
     KnownTypesBinder.AddKnownType(typeof(ResidualRiskEstimatorConfiguration));
     KnownTypesBinder.AddKnownType(typeof(ResidualRiskEstimatorParameter));
 }
示例#13
0
 public void Initialize()
 {
     KnownTypesBinder.AddKnownType(typeof(Annotations.Annotations));
 }