コード例 #1
0
        internal override IntPtr ToNative(PinCollection pin, out NativeTypes.FABRIC_LOCAL_STORE_KIND kind)
        {
            var nativeSettings = new NativeTypes.FABRIC_ESE_LOCAL_STORE_SETTINGS[1];

            nativeSettings[0].DbFolderPath      = pin.AddBlittable(this.DbFolderPath);
            nativeSettings[0].LogFileSizeInKB   = this.LogFileSizeInKB;
            nativeSettings[0].LogBufferSizeInKB = this.LogBufferSizeInKB;
            nativeSettings[0].MaxCursors        = this.MaxCursors;
            nativeSettings[0].MaxVerPages       = this.MaxVerPages;
            nativeSettings[0].MaxAsyncCommitDelayInMilliseconds = (Int32)this.MaxAsyncCommitDelay.TotalMilliseconds;

            var ex1Settings = new NativeTypes.FABRIC_ESE_LOCAL_STORE_SETTINGS_EX1[1];

            ex1Settings[0].EnableIncrementalBackup = NativeTypes.ToBOOLEAN(this.EnableIncrementalBackup);

            var ex2Settings = new NativeTypes.FABRIC_ESE_LOCAL_STORE_SETTINGS_EX2[1];

            ex2Settings[0].MaxCacheSizeInMB = this.MaxCacheSizeInMB;

            var ex3Settings = new NativeTypes.FABRIC_ESE_LOCAL_STORE_SETTINGS_EX3[1];

            ex3Settings[0].MaxDefragFrequencyInMinutes = this.MaxDefragFrequencyInMinutes;
            ex3Settings[0].DefragThresholdInMB         = this.DefragThresholdInMB;
            ex3Settings[0].DatabasePageSizeInKB        = this.DatabasePageSizeInKB;

            var ex4Settings = new NativeTypes.FABRIC_ESE_LOCAL_STORE_SETTINGS_EX4[1];

            ex4Settings[0].CompactionThresholdInMB = this.CompactionThresholdInMB;

            var ex5Settings = new NativeTypes.FABRIC_ESE_LOCAL_STORE_SETTINGS_EX5[1];

            ex5Settings[0].IntrinsicValueThresholdInBytes = this.IntrinsicValueThresholdInBytes;

            var ex6Settings = new NativeTypes.FABRIC_ESE_LOCAL_STORE_SETTINGS_EX6[1];

            ex6Settings[0].EnableOverwriteOnUpdate = NativeTypes.ToBOOLEAN(this.EnableOverwriteOnUpdate);

            nativeSettings[0].Reserved = pin.AddBlittable(ex1Settings);
            ex1Settings[0].Reserved    = pin.AddBlittable(ex2Settings);
            ex2Settings[0].Reserved    = pin.AddBlittable(ex3Settings);
            ex3Settings[0].Reserved    = pin.AddBlittable(ex4Settings);
            ex4Settings[0].Reserved    = pin.AddBlittable(ex5Settings);
            ex5Settings[0].Reserved    = pin.AddBlittable(ex6Settings);

            kind = NativeTypes.FABRIC_LOCAL_STORE_KIND.FABRIC_LOCAL_STORE_KIND_ESE;

            return(pin.AddBlittable(nativeSettings));
        }
コード例 #2
0
 internal abstract IntPtr ToNative(PinCollection pin, out NativeTypes.FABRIC_LOCAL_STORE_KIND kind);