/// <summary>
        /// Init the <see cref="NavigationPropertyRestriction"/>.
        /// </summary>
        /// <param name="record">The input record.</param>
        public void Initialize(IEdmRecordExpression record)
        {
            Utils.CheckArgumentNull(record, nameof(record));

            // NavigationProperty
            NavigationProperty = record.GetPropertyPath("NavigationProperty"); // maybe call "GetNavigationPropertyPath

            // Navigability
            Navigability = record.GetEnum <NavigationType>("Navigability");

            // FilterFunctions
            FilterFunctions = record.GetCollection("FilterFunctions");

            // FilterRestrictions
            FilterRestrictions = record.GetRecord <FilterRestrictionsType>("FilterRestrictions");

            // SearchRestrictions
            SearchRestrictions = record.GetRecord <SearchRestrictionsType>("SearchRestrictions");

            // SortRestrictions
            SortRestrictions = record.GetRecord <SortRestrictionsType>("SortRestrictions");

            // TopSupported
            TopSupported = record.GetBoolean("TopSupported");

            // SkipSupported
            SkipSupported = record.GetBoolean("SkipSupported");

            // SelectSupport
            SelectSupport = record.GetRecord <SelectSupportType>("SelectSupport");

            // IndexableByKey
            IndexableByKey = record.GetBoolean("IndexableByKey");

            // InsertRestrictions
            InsertRestrictions = record.GetRecord <InsertRestrictionsType>("InsertRestrictions");

            // DeepInsertSupport
            DeepInsertSupport = record.GetRecord <DeepInsertSupportType>("DeepInsertSupport");

            // UpdateRestrictions
            UpdateRestrictions = record.GetRecord <UpdateRestrictionsType>("UpdateRestrictions");

            // DeepUpdateSupport
            DeepUpdateSupport = record.GetRecord <DeepUpdateSupportType>("DeepUpdateSupport");

            // DeleteRestrictions
            DeleteRestrictions = record.GetRecord <DeleteRestrictionsType>("DeleteRestrictions");

            // IndexableByKey
            OptimisticConcurrencyControl = record.GetBoolean("OptimisticConcurrencyControl");

            // ReadRestrictions
            ReadRestrictions = record.GetRecord <ReadRestrictionsType>("ReadRestrictions");
        }
Esempio n. 2
0
        /// <summary>
        /// Initialize the capabilities with the vocabulary annotation.
        /// </summary>
        /// <param name="record">The input vocabulary record annotation.</param>
        public void Initialize(IEdmRecordExpression record)
        {
            Utils.CheckArgumentNull(record, nameof(record));

            // Insertable
            Insertable = record.GetBoolean("Insertable");

            // NonInsertableNavigationProperties
            NonInsertableNavigationProperties = record.GetCollectionPropertyPath("NonInsertableNavigationProperties");

            // MaxLevels
            MaxLevels = record.GetInteger("MaxLevels");

            // TypecastSegmentSupported
            TypecastSegmentSupported = record.GetBoolean("TypecastSegmentSupported");

            // Permissions
            Permissions = record.GetCollection <PermissionType>("Permissions");

            // QueryOptions
            QueryOptions = record.GetRecord <ModificationQueryOptionsType>("QueryOptions");

            // CustomHeaders
            CustomHeaders = record.GetCollection <CustomParameter>("CustomHeaders");

            // CustomHeaders
            CustomQueryOptions = record.GetCollection <CustomParameter>("CustomQueryOptions");

            // Description
            Description = record.GetString("Description");

            // LongDescription
            LongDescription = record.GetString("LongDescription");
        }
        /// <summary>
        /// Init the <see cref="ReadRestrictionsType"/>.
        /// </summary>
        /// <param name="record">The input record.</param>
        public override void Initialize(IEdmRecordExpression record)
        {
            // Load base
            base.Initialize(record);

            // ReadByKeyRestrictions
            ReadByKeyRestrictions = record.GetRecord <ReadByKeyRestrictions>("ReadByKeyRestrictions");
        }
        /// <summary>
        /// Init the <see cref="CollectionPropertyRestrictionsType"/>.
        /// </summary>
        /// <param name="record">The input record.</param>
        public virtual void Initialize(IEdmRecordExpression record)
        {
            Utils.CheckArgumentNull(record, nameof(record));

            // CollectionProperty
            CollectionProperty = record.GetPropertyPath("CollectionProperty");

            // FilterFunctions
            FilterFunctions = record.GetCollection("FilterFunctions");

            // FilterRestrictions
            FilterRestrictions = record.GetRecord <FilterRestrictionsType>("FilterRestrictions");

            // SearchRestrictions
            SearchRestrictions = record.GetRecord <SearchRestrictionsType>("SearchRestrictions");

            // SortRestrictions
            SortRestrictions = record.GetRecord <SortRestrictionsType>("SortRestrictions");

            // TopSupported
            TopSupported = record.GetBoolean("TopSupported");

            // SkipSupported
            SkipSupported = record.GetBoolean("SkipSupported");

            // SelectSupport
            SelectSupport = record.GetRecord <SelectSupportType>("SelectSupport");

            // Insertable
            Insertable = record.GetBoolean("Insertable");

            // Updatable
            Updatable = record.GetBoolean("Updatable");

            // Deletable
            Deletable = record.GetBoolean("Deletable");
        }