Ejemplo n.º 1
0
 protected override void DisposeUnmanagedResources()
 {
     lock (this._dictLock)
     {
         if (this._dictObj != null)
         {
             Marshal.FinalReleaseComObject(this._dictObj);
             this._dictObj = null;
         }
     }
 }
Ejemplo n.º 2
0
        public static List <string> GetUserDatasources(string username)
        {
            Dictionary7 dictionary = new Dictionary7();

            try
            {
                string[] datasources = dictionary.GetUserDSNs(username);
                return(datasources.Sanitize().ToList());
            }
            finally
            {
                Marshal.ReleaseComObject(dictionary);
            }
        }
Ejemplo n.º 3
0
        internal Volume(Dictionary7 dictionary, string volumeName, string filterQuery = "", string sortOrder = "")
        {
            Name        = volumeName;
            FilterQuery = filterQuery;
            SortOrder   = sortOrder;

            this._volObj = dictionary.OpenVolume(
                volumeName,
                filterQuery,
                sortOrder,
                "", // FTS expression
                out _
                );

            this._volumeInfo = new Lazy <VolumeInfo>(InitVolumeInfo);
        }
Ejemplo n.º 4
0
        public DictionaryInfo(Dictionary7 dictObj)
        {
            DSN       = dictObj.DSN;
            Version   = dictObj.Version;
            UserName  = dictObj.CurrentUser;
            UserGroup = dictObj.CurrentGroup;

            dictObj.GetUserAttributes(
                UserName,
                out var userFullName,
                out var description,
                out var isLegalResponsible);

            UserFullName       = userFullName;
            Description        = description;
            IsLegalResponsible = isLegalResponsible;
        }
Ejemplo n.º 5
0
 public Dictionary()
 {
     this._dictObj  = new Dictionary7();
     this._dictLock = new object();
 }