コード例 #1
0
 protected ConfigFile(string repoAddress, ConfigSyncMode mode, AnalysisSeverity severity, IEnumerable <T> extensions)
 {
     RepoAddress      = repoAddress;
     SyncMode         = mode;
     Extensions       = extensions;
     AnalysisSeverity = severity;
 }
コード例 #2
0
 public SharperCryptoApiAnalysisConfiguration(string repoAddress, ConfigSyncMode mode, AnalysisSeverity severity, IEnumerable <ISharperCryptoApiExtensionMetadata> extensions)
 {
     SyncMode         = mode;
     RepoAddress      = repoAddress;
     Extensions       = extensions;
     AnalysisSeverity = severity;
 }
        public static bool TryGetSyncMode(XmlDocument document, out ConfigSyncMode syncMode)
        {
            syncMode = ConfigSyncMode.Undefined;
            var syncModeNode = document.SelectSingleNode($"{RootNodeName}/{SyncModeNodeName}");

            return(syncModeNode != null && Enum.TryParse(syncModeNode.InnerText, out syncMode));
        }
        public static void CreateConfigElements(ref XmlElement rootNode, ConfigSyncMode syncMode, string repoAddress, AnalysisSeverity analysisSeverity)
        {
            var syncModeNode = rootNode.OwnerDocument.CreateElement(SyncModeNodeName);

            syncModeNode.InnerText = syncMode.ToString();

            var severityNode = rootNode.OwnerDocument.CreateElement(AnalysisSeverityNodeName);

            severityNode.InnerText = analysisSeverity.ToString();

            var repoAddressNode = rootNode.OwnerDocument.CreateElement(RepoAddressNodeName);

            repoAddressNode.InnerText = repoAddress;

            rootNode.AppendChild(syncModeNode);
            rootNode.AppendChild(repoAddressNode);
            rootNode.AppendChild(severityNode);
        }
コード例 #5
0
 public PublicConfigFile(string repoAddress, ConfigSyncMode mode, AnalysisSeverity severity, IEnumerable <ISharperCryptoApiExtensionMetadata> extensions) :
     base(repoAddress, mode, severity, extensions)
 {
 }
コード例 #6
0
 public PrivateConfigFile(string repoAddress, ConfigSyncMode mode, AnalysisSeverity severity, IReadOnlyCollection <IPrivateSharperCryptoApiExtensionMetadata> extensions) :
     base(repoAddress, mode, severity, extensions)
 {
 }