Exemplo n.º 1
0
        public NameIdMap(IDBAccessor database)
        {
            _database = database;
            _propBag  = database.GetPropertyObjectByNodeId((uint)NodeID.Predefined.nid_name_id_map);

            BucketCount = BitConverter.ToInt32(_propBag.ReadProperty(PropId.KnownValue.PidTagNameidBucketCount), 0);
        }
Exemplo n.º 2
0
        public Pst(string path)
        {
            _dbContext = new DBContext(path);
            _propBag   = _dbContext.GetPropertyObjectByNodeId((uint)NodeID.Predefined.nid_message_store);

            AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
        }
Exemplo n.º 3
0
        public void MessageConstructorTest()
        {
            IDBAccessor     context = null; // TODO: Initialize to an appropriate value
            IPropertyObject propBag = null; // TODO: Initialize to an appropriate value
            Message         target  = new Message(context, propBag);

            Assert.Inconclusive("TODO: Implement code to verify target");
        }
Exemplo n.º 4
0
        public void MessageConstructorTest1()
        {
            IDBAccessor context = null;         // TODO: Initialize to an appropriate value
            NodeID      nodeID  = new NodeID(); // TODO: Initialize to an appropriate value
            Message     target  = new Message(context, nodeID);

            Assert.Inconclusive("TODO: Implement code to verify target");
        }
Exemplo n.º 5
0
        public void DisposeTest()
        {
            IDBAccessor     context = null;                          // TODO: Initialize to an appropriate value
            IPropertyObject propBag = null;                          // TODO: Initialize to an appropriate value
            Message         target  = new Message(context, propBag); // TODO: Initialize to an appropriate value

            target.Dispose();
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }
Exemplo n.º 6
0
        public void PropertyCountTest()
        {
            IDBAccessor database = null;                    // TODO: Initialize to an appropriate value
            NameIdMap   target   = new NameIdMap(database); // TODO: Initialize to an appropriate value
            int         actual;

            actual = target.PropertyCount;
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
Exemplo n.º 7
0
        public void NamedPropertiesTest()
        {
            IDBAccessor database = null;                    // TODO: Initialize to an appropriate value
            NameIdMap   target   = new NameIdMap(database); // TODO: Initialize to an appropriate value
            IEnumerable <INamedProperty> actual;

            actual = target.NamedProperties;
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
Exemplo n.º 8
0
        public void PropertiesTest()
        {
            IDBAccessor          context = null;                          // TODO: Initialize to an appropriate value
            IPropertyObject      propBag = null;                          // TODO: Initialize to an appropriate value
            Message              target  = new Message(context, propBag); // TODO: Initialize to an appropriate value
            IEnumerable <PropId> actual;

            actual = target.Properties;
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
Exemplo n.º 9
0
        public void MessageCountTest()
        {
            IDBAccessor  context = null;                              // TODO: Initialize to an appropriate value
            NodeID       nodeID  = new NodeID();                      // TODO: Initialize to an appropriate value
            SearchFolder target  = new SearchFolder(context, nodeID); // TODO: Initialize to an appropriate value
            int          actual;

            actual = target.MessageCount;
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
Exemplo n.º 10
0
        public void AttachmentCountTest()
        {
            IDBAccessor     context = null;                          // TODO: Initialize to an appropriate value
            IPropertyObject propBag = null;                          // TODO: Initialize to an appropriate value
            Message         target  = new Message(context, propBag); // TODO: Initialize to an appropriate value
            int             actual;

            actual = target.AttachmentCount;
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
Exemplo n.º 11
0
        public void HtmlBodyStreamTest()
        {
            IDBAccessor     context = null;                          // TODO: Initialize to an appropriate value
            IPropertyObject propBag = null;                          // TODO: Initialize to an appropriate value
            Message         target  = new Message(context, propBag); // TODO: Initialize to an appropriate value
            Stream          actual;

            actual = target.HtmlBodyStream;
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
Exemplo n.º 12
0
        public static NodeID GetNodeID(EntryID entryId, IDBAccessor database)
        {
            var nodeId = new byte[4];

            var messageStore = database.GetPropertyObjectByNodeId((uint)NodeID.Predefined.nid_message_store);
            var storeUid     = messageStore.ReadProperty(PropId.KnownValue.PR_RECORD_KEY);

            Array.Copy(entryId, (storeUid.Length + 4), nodeId, 0, 4);

            return(BitConverter.ToUInt32(nodeId, 0));
        }
Exemplo n.º 13
0
        public void LookupTest1()
        {
            IDBAccessor    database      = null;                    // TODO: Initialize to an appropriate value
            NameIdMap      target        = new NameIdMap(database); // TODO: Initialize to an appropriate value
            INamedProperty namedProperty = null;                    // TODO: Initialize to an appropriate value
            PropId         expected      = new PropId();            // TODO: Initialize to an appropriate value
            PropId         actual;

            actual = target.Lookup(namedProperty);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
Exemplo n.º 14
0
        public void PropertyExistsTest()
        {
            IDBAccessor database = null;                    // TODO: Initialize to an appropriate value
            NameIdMap   target   = new NameIdMap(database); // TODO: Initialize to an appropriate value
            PropId      id       = new PropId();            // TODO: Initialize to an appropriate value
            bool        expected = false;                   // TODO: Initialize to an appropriate value
            bool        actual;

            actual = target.PropertyExists(id);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
Exemplo n.º 15
0
        public void NameExistsTest()
        {
            IDBAccessor database = null;                    // TODO: Initialize to an appropriate value
            NameIdMap   target   = new NameIdMap(database); // TODO: Initialize to an appropriate value
            Guid        guid     = new Guid();              // TODO: Initialize to an appropriate value
            string      name     = string.Empty;            // TODO: Initialize to an appropriate value
            bool        expected = false;                   // TODO: Initialize to an appropriate value
            bool        actual;

            actual = target.NameExists(guid, name);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
Exemplo n.º 16
0
        public SampleRepository(IDBAccessor dbAccessor)
        {
            Exception argumentNullException = null;

            if (dbAccessor == null)
            {
                argumentNullException = new ArgumentNullException("dbAccessor");

                throw argumentNullException;
            }

            this._db = dbAccessor;
        }
Exemplo n.º 17
0
        public void ReadPropertyTest()
        {
            IDBAccessor     context = null;                          // TODO: Initialize to an appropriate value
            IPropertyObject propBag = null;                          // TODO: Initialize to an appropriate value
            Message         target  = new Message(context, propBag); // TODO: Initialize to an appropriate value
            PropId          id      = new PropId();                  // TODO: Initialize to an appropriate value

            byte[] expected = null;                                  // TODO: Initialize to an appropriate value
            byte[] actual;
            actual = target.ReadProperty(id);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
Exemplo n.º 18
0
        /// <summary>
        /// Generates a PST-Level EntryID from a PropertyObject and PST Store.
        /// This will not create MAPI level EntryIDs as specified in [MS-OXCDATA] section 2.2
        /// </summary>
        /// <param name="node">Mode to create EntryID from</param>
        /// <param name="database">Database to create EntryID against</param>
        /// <returns></returns>
        public static EntryID GenerateEntryID(NodeID node, IDBAccessor database)
        {
            var entryId = new byte[24];

            var messageStore = database.GetPropertyObjectByNodeId((uint)NodeID.Predefined.nid_message_store);
            var storeUid     = messageStore.ReadProperty(PropId.KnownValue.PR_RECORD_KEY);

            Array.Copy(storeUid, 0, entryId, 4, storeUid.Length);

            Array.Copy(BitConverter.GetBytes(node.Value), 0, entryId, (storeUid.Length + 4), 4);

            return(entryId);
        }
Exemplo n.º 19
0
        public void EqualsTest()
        {
            IDBAccessor     context  = null;                          // TODO: Initialize to an appropriate value
            IPropertyObject propBag  = null;                          // TODO: Initialize to an appropriate value
            Message         target   = new Message(context, propBag); // TODO: Initialize to an appropriate value
            IMessage        other    = null;                          // TODO: Initialize to an appropriate value
            bool            expected = false;                         // TODO: Initialize to an appropriate value
            bool            actual;

            actual = target.Equals(other);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
Exemplo n.º 20
0
 public SearchFolder(IDBAccessor context, NodeID nodeID)
 {
     _dbContext = context;
     _propBag   = _dbContext.GetPropertyObjectByNodeId(nodeID);
 }
Exemplo n.º 21
0
 public EFDbContext(IDBAccessor dbAccessor)
 {
     _dbAccessor = dbAccessor;
 }
Exemplo n.º 22
0
 public Message(IDBAccessor context, IPropertyObject propBag)
 {
     _dbContext = context;
     _propBag   = propBag;
 }
Exemplo n.º 23
0
 public Folder(IDBAccessor context, IPropertyObject propBag)
 {
     _dbContext = context;
     _propBag   = propBag;
 }
Exemplo n.º 24
0
 public Attachment(IDBAccessor context, IPropertyObject propBag, IPropertyObject parent)
 {
     _dbContext = context;
     _propBag   = _dbContext.GetSubObjectByNodeId(parent, propBag.Node);
 }
Exemplo n.º 25
0
 public Recipient(IDBAccessor context, IPropertyObject propBag)
 {
     _dbContext = context;
     _propBag   = propBag;
 }
Exemplo n.º 26
0
 public Message(IDBAccessor context, NodeID nodeID)
 {
     _dbContext = context;
     _propBag   = _dbContext.GetPropertyObjectByNodeId(nodeID);
 }
Exemplo n.º 27
0
 public DBAuthProvider(IDBAccessor dbAccessor)
 {
     _dbAccessor = dbAccessor;
 }