コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="RequestService"/> class.
        /// </summary>
        /// <param name="httpClient">
        /// The HTTP client
        /// </param>
        /// <param name="jsonParser">
        /// The json parser
        /// </param>
        /// <param name="attributeReader">
        /// The attribute reader.
        /// </param>
        /// <param name="informationProvider">
        /// The information provider.
        /// </param>
        public RequestService(
            IHttpClient httpClient,
            IJsonParser jsonParser,
            IAttributeReader attributeReader,
            IInformationProvider informationProvider)
        {
            if (httpClient == null)
            {
                throw new ArgumentNullException(nameof(httpClient));
            }

            if (jsonParser == null)
            {
                throw new ArgumentNullException(nameof(jsonParser));
            }

            if (attributeReader == null)
            {
                throw new ArgumentNullException(nameof(attributeReader));
            }

            if (informationProvider == null)
            {
                throw new ArgumentNullException(nameof(informationProvider));
            }

            this.httpClient          = httpClient;
            this.jsonParser          = jsonParser;
            this.attributeReader     = attributeReader;
            this.informationProvider = informationProvider;
        }
コード例 #2
0
 protected override ISourceClass CreateSourceClassCore(
     GdbTableIdentity identity,
     IAttributeReader attributeReader,
     WorkListStatusSchema statusSchema)
 {
     return(new SelectionSourceClass(identity));
 }
コード例 #3
0
        public override ulong GetValue(IAttributeReader reader, int groupId, int modifier)
        {
            var high = (uint)_highAttribute.GetValue(reader, groupId, modifier);
            var low  = (uint)_lowAttribute.GetValue(reader, groupId, modifier);

            return(((ulong)high << 32) | low);
        }
コード例 #4
0
        public override T GetValue(IAttributeReader reader, int groupId, int modifier)
        {
            AttributeValue value;

            if (reader.TryGetAttributeValue(groupId, _attributeId, modifier, out value))
            {
                return((T)(typeof(T) == typeof(int) ? (object)value.Int32 : (object)value.Single));
            }
            return(_defaultValue);
        }
コード例 #5
0
        //[CanBeNull]
        //protected Table OpenFeatureClass2([NotNull] ISourceClass sourceClass)
        //{
        //	return GeodatabaseBySourceClasses.TryGetValue(sourceClass, out Geodatabase gdb)
        //		       ? sourceClass.OpenFeatureClass(gdb)
        //		       : null;
        //}

        private ISourceClass CreateSourceClass(GdbTableIdentity identity, FeatureClassDefinition definition)
        {
            IAttributeReader attributeReader = CreateAttributeReaderCore(definition);

            WorkListStatusSchema statusSchema = CreateStatusSchemaCore(definition);

            ISourceClass sourceClass = CreateSourceClassCore(identity, attributeReader, statusSchema);

            return(sourceClass);
        }
コード例 #6
0
        public DatabaseSourceClass(GdbTableIdentity identity,
                                   [NotNull] WorkListStatusSchema statusSchema,
                                   [NotNull] IAttributeReader attributeReader) : base(identity)
        {
            Assert.ArgumentNotNull(statusSchema, nameof(statusSchema));
            Assert.ArgumentNotNull(attributeReader, nameof(attributeReader));

            _statusSchema   = statusSchema;
            AttributeReader = attributeReader;
        }
コード例 #7
0
        protected override ISourceClass CreateSourceClassCore(
            GdbTableIdentity identity,
            IAttributeReader attributeReader,
            WorkListStatusSchema statusSchema)
        {
            Assert.ArgumentNotNull(attributeReader, nameof(attributeReader));
            Assert.ArgumentNotNull(statusSchema, nameof(statusSchema));

            return(new DatabaseSourceClass(identity, statusSchema, attributeReader));
        }
コード例 #8
0
        protected override IWorkItem CreateWorkItemCore(Row row, ISourceClass source)
        {
            int id = CreateItemIDCore(row, source);

            IAttributeReader reader = ((DatabaseSourceClass)source).AttributeReader;

            var item = new IssueItem(id, row)
            {
                Status = ((DatabaseSourceClass)source).GetStatus(row),

                IssueCode            = reader.GetValue <string>(row, Attributes.IssueCode),
                IssueCodeDescription = reader.GetValue <string>(row, Attributes.IssueCodeDescription),
                InvolvedObjects      = reader.GetValue <string>(row, Attributes.InvolvedObjects),
                QualityCondition     = reader.GetValue <string>(row, Attributes.QualityConditionName),
                TestName             = reader.GetValue <string>(row, Attributes.TestName),
                TestDescription      = reader.GetValue <string>(row, Attributes.TestDescription),
                TestType             = reader.GetValue <string>(row, Attributes.TestType),
                IssueSeverity        = reader.GetValue <string>(row, Attributes.IssueSeverity),
                StopCondition        = reader.GetValue <string>(row, Attributes.IsStopCondition),
                Category             = reader.GetValue <string>(row, Attributes.Category),
                AffectedComponent    = reader.GetValue <string>(row, Attributes.AffectedComponent),
                Url                          = reader.GetValue <string>(row, Attributes.Url),
                DoubleValue1                 = reader.GetValue <double?>(row, Attributes.DoubleValue1),
                DoubleValue2                 = reader.GetValue <double?>(row, Attributes.DoubleValue2),
                TextValue                    = reader.GetValue <string>(row, Attributes.TextValue),
                IssueAssignment              = reader.GetValue <string>(row, Attributes.IssueAssignment),
                QualityConditionUuid         = reader.GetValue <string>(row, Attributes.QualityConditionUuid),
                QualityConditionVersionUuid  = reader.GetValue <string>(row, Attributes.QualityConditionVersionUuid),
                ExceptionStatus              = reader.GetValue <string>(row, Attributes.ExceptionStatus),
                ExceptionNotes               = reader.GetValue <string>(row, Attributes.ExceptionNotes),
                ExceptionCategory            = reader.GetValue <string>(row, Attributes.ExceptionCategory),
                ExceptionOrigin              = reader.GetValue <string>(row, Attributes.ExceptionOrigin),
                ExceptionDefinedDate         = reader.GetValue <string>(row, Attributes.ExceptionDefinedDate),
                ExceptionLastRevisionDate    = reader.GetValue <string>(row, Attributes.ExceptionLastRevisionDate),
                ExceptionRetirementDate      = reader.GetValue <string>(row, Attributes.ExceptionRetirementDate),
                ExceptionShapeMatchCriterion = reader.GetValue <string>(row, Attributes.ExceptionShapeMatchCriterion)
            };

            item.InIssueInvolvedTables = IssueUtils.ParseInvolvedTables(item.InvolvedObjects);

            return(RefreshState(item));
        }
コード例 #9
0
 public T GetValue(IAttributeReader reader, int groupId) => GetValue(reader, groupId, -1);
コード例 #10
0
 public abstract T GetValue(IAttributeReader reader, int groupId, int modifier);
コード例 #11
0
 public Actor()
 {
     _attributeReader = AttributeCache.Current;
 }
コード例 #12
0
 /// <summary>
 /// Bound by DI container
 /// </summary>
 /// <param name="reader"></param>
 public DefaultClaimsAppender(IAttributeReader reader)
 {
     Reader = reader;
 }
コード例 #13
0
 protected abstract ISourceClass CreateSourceClassCore(GdbTableIdentity identity,
                                                       [CanBeNull] IAttributeReader attributeReader,
                                                       [CanBeNull] WorkListStatusSchema statusSchema);
コード例 #14
0
 public static bool TryWithAttributeReader(this IDirectory model, out IAttributeReader feature)
 {
     Ensure.NotNull(model, "model");
     return(model.TryWith <IAttributeReader>(out feature));
 }
コード例 #15
0
 protected MappingProviderBase()
 {
     attributeReader = CreateAttributeReader();
 }
コード例 #16
0
ファイル: ErrorProvider.cs プロジェクト: L1qu1d1c3/SynoDs
 /// <summary>
 /// Initializes a new instance of the <see cref="ErrorProvider"/> class.
 /// </summary>
 /// <param name="attributeReader">
 /// The attribute reader.
 /// </param>
 public ErrorProvider(IAttributeReader attributeReader)
 {
     this.attributeReader = attributeReader;
 }
コード例 #17
0
 public SvgReader(IAttributeReader attributeReader)
     : this(new TypeResolver(), attributeReader)
 {
 }
コード例 #18
0
 public SvgReader(ITypeResolver typeResolver, IAttributeReader attributeReader)
 {
     _typeResolver          = typeResolver;
     _customAttributeReader = attributeReader;
 }
コード例 #19
0
 /// <summary>
 /// Bound by DI container
 /// </summary>
 /// <param name="reader"></param>
 public DefaultClaimsAppender(IAttributeReader reader)
 {
     Reader = reader;
 }