Beispiel #1
0
        protected virtual void Init(string name, string fullName, MultiformatMessageString shortDescription, MultiformatMessageString fullDescription, Uri downloadUri, Uri informationUri, IDictionary <string, SerializedPropertyInfo> properties)
        {
            Name     = name;
            FullName = fullName;
            if (shortDescription != null)
            {
                ShortDescription = new MultiformatMessageString(shortDescription);
            }

            if (fullDescription != null)
            {
                FullDescription = new MultiformatMessageString(fullDescription);
            }

            if (downloadUri != null)
            {
                DownloadUri = new Uri(downloadUri.OriginalString, downloadUri.IsAbsoluteUri ? UriKind.Absolute : UriKind.Relative);
            }

            if (informationUri != null)
            {
                InformationUri = new Uri(informationUri.OriginalString, informationUri.IsAbsoluteUri ? UriKind.Absolute : UriKind.Relative);
            }

            if (properties != null)
            {
                Properties = new Dictionary <string, SerializedPropertyInfo>(properties);
            }
        }
        private void Init(string id, IEnumerable <string> deprecatedIds, string guid, IEnumerable <string> deprecatedGuids, string name, IEnumerable <string> deprecatedNames, MultiformatMessageString shortDescription, MultiformatMessageString fullDescription, IDictionary <string, MultiformatMessageString> messageStrings, ReportingConfiguration defaultConfiguration, Uri helpUri, MultiformatMessageString help, IEnumerable <ReportingDescriptorRelationship> relationships, IDictionary <string, SerializedPropertyInfo> properties)
        {
            Id = id;
            if (deprecatedIds != null)
            {
                var destination_0 = new List <string>();
                foreach (var value_0 in deprecatedIds)
                {
                    destination_0.Add(value_0);
                }

                DeprecatedIds = destination_0;
            }

            Guid = guid;
            if (deprecatedGuids != null)
            {
                var destination_1 = new List <string>();
                foreach (var value_1 in deprecatedGuids)
                {
                    destination_1.Add(value_1);
                }

                DeprecatedGuids = destination_1;
            }

            Name = name;
            if (deprecatedNames != null)
            {
                var destination_2 = new List <string>();
                foreach (var value_2 in deprecatedNames)
                {
                    destination_2.Add(value_2);
                }

                DeprecatedNames = destination_2;
            }

            if (shortDescription != null)
            {
                ShortDescription = new MultiformatMessageString(shortDescription);
            }

            if (fullDescription != null)
            {
                FullDescription = new MultiformatMessageString(fullDescription);
            }

            if (messageStrings != null)
            {
                MessageStrings = new Dictionary <string, MultiformatMessageString>();
                foreach (var value_3 in messageStrings)
                {
                    MessageStrings.Add(value_3.Key, new MultiformatMessageString(value_3.Value));
                }
            }

            if (defaultConfiguration != null)
            {
                DefaultConfiguration = new ReportingConfiguration(defaultConfiguration);
            }

            if (helpUri != null)
            {
                HelpUri = new Uri(helpUri.OriginalString, helpUri.IsAbsoluteUri ? UriKind.Absolute : UriKind.Relative);
            }

            if (help != null)
            {
                Help = new MultiformatMessageString(help);
            }

            if (relationships != null)
            {
                var destination_3 = new List <ReportingDescriptorRelationship>();
                foreach (var value_4 in relationships)
                {
                    if (value_4 == null)
                    {
                        destination_3.Add(null);
                    }
                    else
                    {
                        destination_3.Add(new ReportingDescriptorRelationship(value_4));
                    }
                }

                Relationships = destination_3;
            }

            if (properties != null)
            {
                Properties = new Dictionary <string, SerializedPropertyInfo>(properties);
            }
        }
Beispiel #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TranslationMetadata" /> class from the supplied values.
 /// </summary>
 /// <param name="name">
 /// An initialization value for the <see cref="P:Name" /> property.
 /// </param>
 /// <param name="fullName">
 /// An initialization value for the <see cref="P:FullName" /> property.
 /// </param>
 /// <param name="shortDescription">
 /// An initialization value for the <see cref="P:ShortDescription" /> property.
 /// </param>
 /// <param name="fullDescription">
 /// An initialization value for the <see cref="P:FullDescription" /> property.
 /// </param>
 /// <param name="downloadUri">
 /// An initialization value for the <see cref="P:DownloadUri" /> property.
 /// </param>
 /// <param name="informationUri">
 /// An initialization value for the <see cref="P:InformationUri" /> property.
 /// </param>
 /// <param name="properties">
 /// An initialization value for the <see cref="P:Properties" /> property.
 /// </param>
 public TranslationMetadata(string name, string fullName, MultiformatMessageString shortDescription, MultiformatMessageString fullDescription, Uri downloadUri, Uri informationUri, IDictionary <string, SerializedPropertyInfo> properties)
 {
     Init(name, fullName, shortDescription, fullDescription, downloadUri, informationUri, properties);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ArtifactContent" /> class from the supplied values.
 /// </summary>
 /// <param name="text">
 /// An initialization value for the <see cref="P:Text" /> property.
 /// </param>
 /// <param name="binary">
 /// An initialization value for the <see cref="P:Binary" /> property.
 /// </param>
 /// <param name="rendered">
 /// An initialization value for the <see cref="P:Rendered" /> property.
 /// </param>
 /// <param name="properties">
 /// An initialization value for the <see cref="P:Properties" /> property.
 /// </param>
 public ArtifactContent(string text, string binary, MultiformatMessageString rendered, IDictionary <string, SerializedPropertyInfo> properties)
 {
     Init(text, binary, rendered, properties);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ReportingDescriptor" /> class from the supplied values.
 /// </summary>
 /// <param name="id">
 /// An initialization value for the <see cref="P:Id" /> property.
 /// </param>
 /// <param name="deprecatedIds">
 /// An initialization value for the <see cref="P:DeprecatedIds" /> property.
 /// </param>
 /// <param name="guid">
 /// An initialization value for the <see cref="P:Guid" /> property.
 /// </param>
 /// <param name="deprecatedGuids">
 /// An initialization value for the <see cref="P:DeprecatedGuids" /> property.
 /// </param>
 /// <param name="name">
 /// An initialization value for the <see cref="P:Name" /> property.
 /// </param>
 /// <param name="deprecatedNames">
 /// An initialization value for the <see cref="P:DeprecatedNames" /> property.
 /// </param>
 /// <param name="shortDescription">
 /// An initialization value for the <see cref="P:ShortDescription" /> property.
 /// </param>
 /// <param name="fullDescription">
 /// An initialization value for the <see cref="P:FullDescription" /> property.
 /// </param>
 /// <param name="messageStrings">
 /// An initialization value for the <see cref="P:MessageStrings" /> property.
 /// </param>
 /// <param name="defaultConfiguration">
 /// An initialization value for the <see cref="P:DefaultConfiguration" /> property.
 /// </param>
 /// <param name="helpUri">
 /// An initialization value for the <see cref="P:HelpUri" /> property.
 /// </param>
 /// <param name="help">
 /// An initialization value for the <see cref="P:Help" /> property.
 /// </param>
 /// <param name="relationships">
 /// An initialization value for the <see cref="P:Relationships" /> property.
 /// </param>
 /// <param name="properties">
 /// An initialization value for the <see cref="P:Properties" /> property.
 /// </param>
 public ReportingDescriptor(string id, IEnumerable <string> deprecatedIds, string guid, IEnumerable <string> deprecatedGuids, string name, IEnumerable <string> deprecatedNames, MultiformatMessageString shortDescription, MultiformatMessageString fullDescription, IDictionary <string, MultiformatMessageString> messageStrings, ReportingConfiguration defaultConfiguration, Uri helpUri, MultiformatMessageString help, IEnumerable <ReportingDescriptorRelationship> relationships, IDictionary <string, SerializedPropertyInfo> properties)
 {
     Init(id, deprecatedIds, guid, deprecatedGuids, name, deprecatedNames, shortDescription, fullDescription, messageStrings, defaultConfiguration, helpUri, help, relationships, properties);
 }
        private void Init(string id, string guid, MultiformatMessageString shortDescription, MultiformatMessageString fullDescription, object messageStrings, IDictionary <string, SerializedPropertyInfo> properties)
        {
            Id   = id;
            Guid = guid;
            if (shortDescription != null)
            {
                ShortDescription = new MultiformatMessageString(shortDescription);
            }

            if (fullDescription != null)
            {
                FullDescription = new MultiformatMessageString(fullDescription);
            }

            MessageStrings = messageStrings;
            if (properties != null)
            {
                Properties = new Dictionary <string, SerializedPropertyInfo>(properties);
            }
        }
 public bool ValueEquals(MultiformatMessageString other) => ValueComparer.Equals(this, other);
 /// <summary>
 /// Initializes a new instance of the <see cref="ReportingDescriptorTranslation" /> class from the supplied values.
 /// </summary>
 /// <param name="id">
 /// An initialization value for the <see cref="P:Id" /> property.
 /// </param>
 /// <param name="guid">
 /// An initialization value for the <see cref="P:Guid" /> property.
 /// </param>
 /// <param name="shortDescription">
 /// An initialization value for the <see cref="P:ShortDescription" /> property.
 /// </param>
 /// <param name="fullDescription">
 /// An initialization value for the <see cref="P:FullDescription" /> property.
 /// </param>
 /// <param name="messageStrings">
 /// An initialization value for the <see cref="P:MessageStrings" /> property.
 /// </param>
 /// <param name="properties">
 /// An initialization value for the <see cref="P:Properties" /> property.
 /// </param>
 public ReportingDescriptorTranslation(string id, string guid, MultiformatMessageString shortDescription, MultiformatMessageString fullDescription, object messageStrings, IDictionary <string, SerializedPropertyInfo> properties)
 {
     Init(id, guid, shortDescription, fullDescription, messageStrings, properties);
 }
Beispiel #9
0
        private void Init(string guid, string name, string organization, string product, string productSuite, MultiformatMessageString shortDescription, MultiformatMessageString fullDescription, string fullName, string version, string semanticVersion, string dottedQuadFileVersion, string releaseDateUtc, Uri downloadUri, Uri informationUri, IDictionary <string, MultiformatMessageString> globalMessageStrings, IEnumerable <ReportingDescriptor> notifications, IEnumerable <ReportingDescriptor> rules, IEnumerable <ReportingDescriptor> taxa, IEnumerable <ArtifactLocation> locations, string language, ToolComponentContents contents, bool isComprehensive, string localizedDataSemanticVersion, string minimumRequiredLocalizedDataSemanticVersion, ToolComponentReference associatedComponent, TranslationMetadata translationMetadata, IEnumerable <ToolComponentReference> supportedTaxonomies, IDictionary <string, SerializedPropertyInfo> properties)
        {
            Guid         = guid;
            Name         = name;
            Organization = organization;
            Product      = product;
            ProductSuite = productSuite;
            if (shortDescription != null)
            {
                ShortDescription = new MultiformatMessageString(shortDescription);
            }

            if (fullDescription != null)
            {
                FullDescription = new MultiformatMessageString(fullDescription);
            }

            FullName              = fullName;
            Version               = version;
            SemanticVersion       = semanticVersion;
            DottedQuadFileVersion = dottedQuadFileVersion;
            ReleaseDateUtc        = releaseDateUtc;
            if (downloadUri != null)
            {
                DownloadUri = new Uri(downloadUri.OriginalString, downloadUri.IsAbsoluteUri ? UriKind.Absolute : UriKind.Relative);
            }

            if (informationUri != null)
            {
                InformationUri = new Uri(informationUri.OriginalString, informationUri.IsAbsoluteUri ? UriKind.Absolute : UriKind.Relative);
            }

            if (globalMessageStrings != null)
            {
                GlobalMessageStrings = new Dictionary <string, MultiformatMessageString>();
                foreach (var value_0 in globalMessageStrings)
                {
                    GlobalMessageStrings.Add(value_0.Key, new MultiformatMessageString(value_0.Value));
                }
            }

            if (notifications != null)
            {
                var destination_0 = new List <ReportingDescriptor>();
                foreach (var value_1 in notifications)
                {
                    if (value_1 == null)
                    {
                        destination_0.Add(null);
                    }
                    else
                    {
                        destination_0.Add(new ReportingDescriptor(value_1));
                    }
                }

                Notifications = destination_0;
            }

            if (rules != null)
            {
                var destination_1 = new List <ReportingDescriptor>();
                foreach (var value_2 in rules)
                {
                    if (value_2 == null)
                    {
                        destination_1.Add(null);
                    }
                    else
                    {
                        destination_1.Add(new ReportingDescriptor(value_2));
                    }
                }

                Rules = destination_1;
            }

            if (taxa != null)
            {
                var destination_2 = new List <ReportingDescriptor>();
                foreach (var value_3 in taxa)
                {
                    if (value_3 == null)
                    {
                        destination_2.Add(null);
                    }
                    else
                    {
                        destination_2.Add(new ReportingDescriptor(value_3));
                    }
                }

                Taxa = destination_2;
            }

            if (locations != null)
            {
                var destination_3 = new List <ArtifactLocation>();
                foreach (var value_4 in locations)
                {
                    if (value_4 == null)
                    {
                        destination_3.Add(null);
                    }
                    else
                    {
                        destination_3.Add(new ArtifactLocation(value_4));
                    }
                }

                Locations = destination_3;
            }

            Language        = language;
            Contents        = contents;
            IsComprehensive = isComprehensive;
            LocalizedDataSemanticVersion = localizedDataSemanticVersion;
            MinimumRequiredLocalizedDataSemanticVersion = minimumRequiredLocalizedDataSemanticVersion;
            if (associatedComponent != null)
            {
                AssociatedComponent = new ToolComponentReference(associatedComponent);
            }

            if (translationMetadata != null)
            {
                TranslationMetadata = new TranslationMetadata(translationMetadata);
            }

            if (supportedTaxonomies != null)
            {
                var destination_4 = new List <ToolComponentReference>();
                foreach (var value_5 in supportedTaxonomies)
                {
                    if (value_5 == null)
                    {
                        destination_4.Add(null);
                    }
                    else
                    {
                        destination_4.Add(new ToolComponentReference(value_5));
                    }
                }

                SupportedTaxonomies = destination_4;
            }

            if (properties != null)
            {
                Properties = new Dictionary <string, SerializedPropertyInfo>(properties);
            }
        }
Beispiel #10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ToolComponent" /> class from the supplied values.
 /// </summary>
 /// <param name="guid">
 /// An initialization value for the <see cref="P:Guid" /> property.
 /// </param>
 /// <param name="name">
 /// An initialization value for the <see cref="P:Name" /> property.
 /// </param>
 /// <param name="organization">
 /// An initialization value for the <see cref="P:Organization" /> property.
 /// </param>
 /// <param name="product">
 /// An initialization value for the <see cref="P:Product" /> property.
 /// </param>
 /// <param name="productSuite">
 /// An initialization value for the <see cref="P:ProductSuite" /> property.
 /// </param>
 /// <param name="shortDescription">
 /// An initialization value for the <see cref="P:ShortDescription" /> property.
 /// </param>
 /// <param name="fullDescription">
 /// An initialization value for the <see cref="P:FullDescription" /> property.
 /// </param>
 /// <param name="fullName">
 /// An initialization value for the <see cref="P:FullName" /> property.
 /// </param>
 /// <param name="version">
 /// An initialization value for the <see cref="P:Version" /> property.
 /// </param>
 /// <param name="semanticVersion">
 /// An initialization value for the <see cref="P:SemanticVersion" /> property.
 /// </param>
 /// <param name="dottedQuadFileVersion">
 /// An initialization value for the <see cref="P:DottedQuadFileVersion" /> property.
 /// </param>
 /// <param name="releaseDateUtc">
 /// An initialization value for the <see cref="P:ReleaseDateUtc" /> property.
 /// </param>
 /// <param name="downloadUri">
 /// An initialization value for the <see cref="P:DownloadUri" /> property.
 /// </param>
 /// <param name="informationUri">
 /// An initialization value for the <see cref="P:InformationUri" /> property.
 /// </param>
 /// <param name="globalMessageStrings">
 /// An initialization value for the <see cref="P:GlobalMessageStrings" /> property.
 /// </param>
 /// <param name="notifications">
 /// An initialization value for the <see cref="P:Notifications" /> property.
 /// </param>
 /// <param name="rules">
 /// An initialization value for the <see cref="P:Rules" /> property.
 /// </param>
 /// <param name="taxa">
 /// An initialization value for the <see cref="P:Taxa" /> property.
 /// </param>
 /// <param name="locations">
 /// An initialization value for the <see cref="P:Locations" /> property.
 /// </param>
 /// <param name="language">
 /// An initialization value for the <see cref="P:Language" /> property.
 /// </param>
 /// <param name="contents">
 /// An initialization value for the <see cref="P:Contents" /> property.
 /// </param>
 /// <param name="isComprehensive">
 /// An initialization value for the <see cref="P:IsComprehensive" /> property.
 /// </param>
 /// <param name="localizedDataSemanticVersion">
 /// An initialization value for the <see cref="P:LocalizedDataSemanticVersion" /> property.
 /// </param>
 /// <param name="minimumRequiredLocalizedDataSemanticVersion">
 /// An initialization value for the <see cref="P:MinimumRequiredLocalizedDataSemanticVersion" /> property.
 /// </param>
 /// <param name="associatedComponent">
 /// An initialization value for the <see cref="P:AssociatedComponent" /> property.
 /// </param>
 /// <param name="translationMetadata">
 /// An initialization value for the <see cref="P:TranslationMetadata" /> property.
 /// </param>
 /// <param name="supportedTaxonomies">
 /// An initialization value for the <see cref="P:SupportedTaxonomies" /> property.
 /// </param>
 /// <param name="properties">
 /// An initialization value for the <see cref="P:Properties" /> property.
 /// </param>
 public ToolComponent(string guid, string name, string organization, string product, string productSuite, MultiformatMessageString shortDescription, MultiformatMessageString fullDescription, string fullName, string version, string semanticVersion, string dottedQuadFileVersion, string releaseDateUtc, Uri downloadUri, Uri informationUri, IDictionary <string, MultiformatMessageString> globalMessageStrings, IEnumerable <ReportingDescriptor> notifications, IEnumerable <ReportingDescriptor> rules, IEnumerable <ReportingDescriptor> taxa, IEnumerable <ArtifactLocation> locations, string language, ToolComponentContents contents, bool isComprehensive, string localizedDataSemanticVersion, string minimumRequiredLocalizedDataSemanticVersion, ToolComponentReference associatedComponent, TranslationMetadata translationMetadata, IEnumerable <ToolComponentReference> supportedTaxonomies, IDictionary <string, SerializedPropertyInfo> properties)
 {
     Init(guid, name, organization, product, productSuite, shortDescription, fullDescription, fullName, version, semanticVersion, dottedQuadFileVersion, releaseDateUtc, downloadUri, informationUri, globalMessageStrings, notifications, rules, taxa, locations, language, contents, isComprehensive, localizedDataSemanticVersion, minimumRequiredLocalizedDataSemanticVersion, associatedComponent, translationMetadata, supportedTaxonomies, properties);
 }
Beispiel #11
0
        private void Init(string guid, string name, string organization, string product, MultiformatMessageString shortDescription, MultiformatMessageString fullDescription, string fullName, string version, string semanticVersion, string dottedQuadFileVersion, Uri downloadUri, IDictionary <string, MultiformatMessageString> globalMessageStrings, IEnumerable <ReportingDescriptor> notificationDescriptors, IEnumerable <ReportingDescriptor> ruleDescriptors, IEnumerable <int> artifactIndices, IDictionary <string, SerializedPropertyInfo> properties)
        {
            Guid         = guid;
            Name         = name;
            Organization = organization;
            Product      = product;
            if (shortDescription != null)
            {
                ShortDescription = new MultiformatMessageString(shortDescription);
            }

            if (fullDescription != null)
            {
                FullDescription = new MultiformatMessageString(fullDescription);
            }

            FullName              = fullName;
            Version               = version;
            SemanticVersion       = semanticVersion;
            DottedQuadFileVersion = dottedQuadFileVersion;
            if (downloadUri != null)
            {
                DownloadUri = new Uri(downloadUri.OriginalString, downloadUri.IsAbsoluteUri ? UriKind.Absolute : UriKind.Relative);
            }

            if (globalMessageStrings != null)
            {
                GlobalMessageStrings = new Dictionary <string, MultiformatMessageString>();
                foreach (var value_0 in globalMessageStrings)
                {
                    GlobalMessageStrings.Add(value_0.Key, new MultiformatMessageString(value_0.Value));
                }
            }

            if (notificationDescriptors != null)
            {
                var destination_0 = new List <ReportingDescriptor>();
                foreach (var value_1 in notificationDescriptors)
                {
                    if (value_1 == null)
                    {
                        destination_0.Add(null);
                    }
                    else
                    {
                        destination_0.Add(new ReportingDescriptor(value_1));
                    }
                }

                NotificationDescriptors = destination_0;
            }

            if (ruleDescriptors != null)
            {
                var destination_1 = new List <ReportingDescriptor>();
                foreach (var value_2 in ruleDescriptors)
                {
                    if (value_2 == null)
                    {
                        destination_1.Add(null);
                    }
                    else
                    {
                        destination_1.Add(new ReportingDescriptor(value_2));
                    }
                }

                RuleDescriptors = destination_1;
            }

            if (artifactIndices != null)
            {
                var destination_2 = new List <int>();
                foreach (var value_3 in artifactIndices)
                {
                    destination_2.Add(value_3);
                }

                ArtifactIndices = destination_2;
            }

            if (properties != null)
            {
                Properties = new Dictionary <string, SerializedPropertyInfo>(properties);
            }
        }
Beispiel #12
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ToolComponent" /> class from the supplied values.
 /// </summary>
 /// <param name="guid">
 /// An initialization value for the <see cref="P:Guid" /> property.
 /// </param>
 /// <param name="name">
 /// An initialization value for the <see cref="P:Name" /> property.
 /// </param>
 /// <param name="organization">
 /// An initialization value for the <see cref="P:Organization" /> property.
 /// </param>
 /// <param name="product">
 /// An initialization value for the <see cref="P:Product" /> property.
 /// </param>
 /// <param name="shortDescription">
 /// An initialization value for the <see cref="P:ShortDescription" /> property.
 /// </param>
 /// <param name="fullDescription">
 /// An initialization value for the <see cref="P:FullDescription" /> property.
 /// </param>
 /// <param name="fullName">
 /// An initialization value for the <see cref="P:FullName" /> property.
 /// </param>
 /// <param name="version">
 /// An initialization value for the <see cref="P:Version" /> property.
 /// </param>
 /// <param name="semanticVersion">
 /// An initialization value for the <see cref="P:SemanticVersion" /> property.
 /// </param>
 /// <param name="dottedQuadFileVersion">
 /// An initialization value for the <see cref="P:DottedQuadFileVersion" /> property.
 /// </param>
 /// <param name="downloadUri">
 /// An initialization value for the <see cref="P:DownloadUri" /> property.
 /// </param>
 /// <param name="globalMessageStrings">
 /// An initialization value for the <see cref="P:GlobalMessageStrings" /> property.
 /// </param>
 /// <param name="notificationDescriptors">
 /// An initialization value for the <see cref="P:NotificationDescriptors" /> property.
 /// </param>
 /// <param name="ruleDescriptors">
 /// An initialization value for the <see cref="P:RuleDescriptors" /> property.
 /// </param>
 /// <param name="artifactIndices">
 /// An initialization value for the <see cref="P:ArtifactIndices" /> property.
 /// </param>
 /// <param name="properties">
 /// An initialization value for the <see cref="P:Properties" /> property.
 /// </param>
 public ToolComponent(string guid, string name, string organization, string product, MultiformatMessageString shortDescription, MultiformatMessageString fullDescription, string fullName, string version, string semanticVersion, string dottedQuadFileVersion, Uri downloadUri, IDictionary <string, MultiformatMessageString> globalMessageStrings, IEnumerable <ReportingDescriptor> notificationDescriptors, IEnumerable <ReportingDescriptor> ruleDescriptors, IEnumerable <int> artifactIndices, IDictionary <string, SerializedPropertyInfo> properties)
 {
     Init(guid, name, organization, product, shortDescription, fullDescription, fullName, version, semanticVersion, dottedQuadFileVersion, downloadUri, globalMessageStrings, notificationDescriptors, ruleDescriptors, artifactIndices, properties);
 }