示例#1
0
        internal override void ReadFromVolumeDBRecord(IRecordData recordData)
        {
            base.ReadFromVolumeDBRecord(recordData);

            long tmp = (long)recordData["Size"];
            duration = TimeSpan.FromSeconds(tmp);
        }
示例#2
0
        internal override void WriteToVolumeDBRecord(IRecordData recordData)
        {
            base.WriteToVolumeDBRecord(recordData);

            recordData.AddField("Files", tracks);
            recordData.AddField("Size", (long)duration.TotalSeconds);
        }
示例#3
0
        internal override void ReadFromVolumeDBRecord(IRecordData recordData)
        {
            base.ReadFromVolumeDBRecord(recordData);

            files = (long)recordData["Files"];
            dirs  = (long)recordData["Dirs"];
            size  = (long)recordData["Size"];
        }
示例#4
0
        internal override void ReadFromVolumeDBRecord(IRecordData recordData)
        {
            base.ReadFromVolumeDBRecord(recordData);

            long tmp = (long)recordData["Size"];

            duration = TimeSpan.FromSeconds(tmp);
        }
示例#5
0
 internal override void ReadFromVolumeDBRecord(IRecordData recordData)
 {
     name        = Util.ReplaceDBNull <string>(recordData["Name"], null);
     description = Util.ReplaceDBNull <string>(recordData["Description"], null);
     created     = Util.ReplaceDBNull <DateTime>(recordData["Created"], DateTime.MinValue);
     version     = (int)(long)recordData["Version"];
     guid        = (string)recordData["GUID"];
 }
示例#6
0
 internal override void WriteToVolumeDBRecord(IRecordData recordData)
 {
     recordData.AddField("Name", name);
     recordData.AddField("Description", description);
     recordData.AddField("Created", created);
     recordData.AddField("Version", version);
     recordData.AddField("GUID", guid);
 }
示例#7
0
        internal override void WriteToVolumeDBRecord(IRecordData recordData)
        {
            base.WriteToVolumeDBRecord(recordData);

            recordData.AddField("Files", files);
            recordData.AddField("Dirs", dirs);
            recordData.AddField("Size", size);
        }
示例#8
0
        internal override void ReadFromVolumeDBRecord(IRecordData recordData)
        {
            base.ReadFromVolumeDBRecord(recordData);

            files = (long)recordData["Files"];
            dirs  = (long)recordData["Dirs"];
            size  = (long)recordData["Size"];
        }
示例#9
0
        //private static void ValidateFilename(string filename)
        //{
        //	  if (filename == null)
        //		  throw new ArgumentNullException("filename");

        //	  if (filename.Length == 0)
        //		  throw new ArgumentException("filename is empty");
        //}

        internal override void ReadFromVolumeDBRecord(IRecordData recordData)
        {
            base.ReadFromVolumeDBRecord(recordData);

            //filename	=	(string)				recordData["Filename"];
            //extension =	Util.ReplaceDBNull<string>(	recordData["Extension"],  null);
            size = (long)recordData["Size"];
            hash = Util.ReplaceDBNull <string>(recordData["Hash"], null);
        }
示例#10
0
        internal override void WriteToVolumeDBRecord(IRecordData recordData)
        {
            base.WriteToVolumeDBRecord(recordData);

            //recordData.AddField("Filename",  filename);
            //recordData.AddField("Extension", extension);
            recordData.AddField("Size", size);
            recordData.AddField("Hash", hash);
        }
示例#11
0
        //private static void ValidatePath(string path)
        //{
        //	  if (path == null)
        //		  throw new ArgumentNullException("path");

        //	  if (path.Length == 0)
        //		  throw new ArgumentException("path is emtpy");
        //}

        internal override void ReadFromVolumeDBRecord(IRecordData recordData)
        {
            base.ReadFromVolumeDBRecord(recordData);

            location = Util.ReplaceDBNull <string>(recordData["Location"], null);                                      /* root item doesnt have a location */
            //createdDate	= Util.ReplaceDBNull<DateTime>(	recordData["CreatedDate"],	DateTime.MinValue);
            lastWriteTime   = Util.ReplaceDBNull <DateTime>(recordData["LastWriteTime"], DateTime.MinValue);
            symLinkTargetID = (long)recordData["SymLinkTargetID"];
        }
示例#12
0
        internal override void WriteToVolumeDBRecord(IRecordData recordData)
        {
            base.WriteToVolumeDBRecord(recordData);

            recordData.AddField("Location", location);
            //recordData.AddField("CreatedDate",  m_createdDate);
            recordData.AddField("LastWriteTime", lastWriteTime);
            //recordData.AddField("SymLinkTargetID",  symLinkTargetID < -1 ? -1 : symLinkTargetID);
            recordData.AddField("SymLinkTargetID", symLinkTargetID);
        }
示例#13
0
文件: DnsEntry.cs 项目: yslib/minimvc
        public DnsEntry(DataBuffer buffer)
        {
            try
            {
                _domain = buffer.ReadDomainName();
                byte b = buffer.ReadByte();
                _recType = (RecordType)buffer.ReadShortInt();
                _classType = buffer.ReadShortInt();
                _ttl = buffer.ReadInt();

                int length = buffer.ReadByte();
                switch (_recType)
                {
                    case RecordType.A: _data = new ARecord(buffer); break;
                    case RecordType.NS: _data = new NSRecord(buffer); break;
                    case RecordType.CNAME: _data = new CNameRecord(buffer); break;
                    case RecordType.SOA: _data = new SoaRecord(buffer); break;
                    case RecordType.MB: _data = new MBRecord(buffer); break;
                    case RecordType.MG: _data = new MGRecord(buffer); break;
                    case RecordType.MR: _data = new MRRecord(buffer); break;
                    case RecordType.NULL: _data = new NullRecord(buffer, length); break;
                    case RecordType.WKS: _data = new WksRecord(buffer, length); break;
                    case RecordType.PTR: _data = new PtrRecord(buffer); break;
                    case RecordType.HINFO: _data = new HInfoRecord(buffer, length); break;
                    case RecordType.MINFO: _data = new MInfoRecord(buffer); break;
                    case RecordType.MX: _data = new MXRecord(buffer); break;
                    case RecordType.TXT: _data = new TxtRecord(buffer, length); break;
                    case RecordType.RP: _data = new RPRecord(buffer); break;
                    case RecordType.AFSDB: _data = new AfsdbRecord(buffer); break;
                    case RecordType.X25: _data = new X25Record(buffer); break;
                    case RecordType.ISDN: _data = new IsdnRecord(buffer); break;
                    case RecordType.RT: _data = new RTRecord(buffer); break;
                    case RecordType.NSAP: _data = new NsapRecord(buffer, length); break;
                    case RecordType.SIG: _data = new SigRecord(buffer, length); break;
                    case RecordType.KEY: _data = new KeyRecord(buffer, length); break;
                    case RecordType.PX: _data = new PXRecord(buffer); break;
                    case RecordType.AAAA: _data = new AAAARecord(buffer); break;
                    case RecordType.LOC: _data = new LocRecord(buffer); break;
                    case RecordType.SRV: _data = new SrvRecord(buffer); break;
                    case RecordType.NAPTR: _data = new NaptrRecord(buffer); break;
                    case RecordType.KX: _data = new KXRecord(buffer); break;
                    case RecordType.A6: _data = new A6Record(buffer); break;
                    case RecordType.DNAME: _data = new DNameRecord(buffer); break;
                    case RecordType.DS: _data = new DSRecord(buffer, length); break;
                    case RecordType.TKEY: _data = new TKeyRecord(buffer); break;
                    case RecordType.TSIG: _data = new TSigRecord(buffer); break;
                    default: throw new DnsQueryException("Invalid DNS Record Type in DNS Response", null);
                }
            }
            catch (Exception ex)
            {
                _data = new ExceptionRecord(ex.Message);
                throw ex;
            }
        }
示例#14
0
 internal override void ReadFromVolumeDBRecord(IRecordData recordData)
 {
     volumeID = (long)recordData["VolumeID"];
     itemID   = (long)recordData["ItemID"];
     //rootID	= (long)				  recordData["RootID"];
     parentID = (long)recordData["ParentID"];
     name     = Util.ReplaceDBNull <string>(recordData["Name"], null);
     mimeType = Util.ReplaceDBNull <string>(recordData["MimeType"], null);
     metaData = new MetadataStore(Util.ReplaceDBNull <string>(recordData["MetaData"], null));
     note     = Util.ReplaceDBNull <string>(recordData["Note"], null);
     keywords = Util.ReplaceDBNull <string>(recordData["Keywords"], null);
 }
示例#15
0
 internal override void WriteToVolumeDBRecord(IRecordData recordData)
 {
     recordData.AddField("VolumeID", volumeID);
     recordData.AddField("ItemID", itemID);
     //recordData.AddField("RootID",  rootID);
     recordData.AddField("ParentID", parentID);
     recordData.AddField("ItemType", itemType);
     recordData.AddField("Name", name);
     recordData.AddField("MimeType", mimeType);
     // NOTE : metadata can't be null since it is a struct
     recordData.AddField("MetaData", metaData.MetadataString);
     recordData.AddField("Note", note);
     recordData.AddField("Keywords", keywords);
 }
示例#16
0
文件: Volume.cs 项目: balihb/basenji
        internal override void ReadFromVolumeDBRecord(IRecordData recordData)
        {
            volumeID = (long)recordData["VolumeID"];
            title    = Util.ReplaceDBNull <string>(recordData["Title"], null);
            added    = Util.ReplaceDBNull <DateTime>(recordData["Added"], DateTime.MinValue);
            isHashed = (bool)recordData["IsHashed"];

            archiveNo   = Util.ReplaceDBNull <string>(recordData["ArchiveNr"], null);
            driveType   = (VolumeDriveType)(int)(long)recordData["DriveType"];
            loanedTo    = Util.ReplaceDBNull <string>(recordData["Loaned_To"], null);
            loanedDate  = Util.ReplaceDBNull <DateTime>(recordData["Loaned_Date"], DateTime.MinValue);
            returnDate  = Util.ReplaceDBNull <DateTime>(recordData["Return_Date"], DateTime.MinValue);
            category    = Util.ReplaceDBNull <string>(recordData["Category"], null);
            description = Util.ReplaceDBNull <string>(recordData["Description"], null);
            keywords    = Util.ReplaceDBNull <string>(recordData["Keywords"], null);
            //clientAppData   = Util.ReplaceDBNull<string>(		  recordData["ClientAppData"], null);
        }
示例#17
0
文件: Volume.cs 项目: balihb/basenji
        internal override void WriteToVolumeDBRecord(IRecordData recordData)
        {
            recordData.AddField("VolumeID", volumeID);
            recordData.AddField("Title", title);
            recordData.AddField("Added", added);
            recordData.AddField("VolumeType", volumeType);
            recordData.AddField("IsHashed", isHashed);

            recordData.AddField("ArchiveNr", archiveNo);
            recordData.AddField("DriveType", driveType);
            recordData.AddField("Loaned_To", loanedTo);
            recordData.AddField("Loaned_Date", loanedDate);
            recordData.AddField("Return_Date", returnDate);
            recordData.AddField("Category", category);
            recordData.AddField("Description", description);
            recordData.AddField("Keywords", keywords);
            //recordData.AddField("ClientAppData",	  clientAppData);
        }
示例#18
0
        internal override void WriteToVolumeDBRecord(IRecordData recordData)
        {
            base.WriteToVolumeDBRecord(recordData);

            recordData.AddField("Files", tracks);
            recordData.AddField("Size",  (long)duration.TotalSeconds);
        }
示例#19
0
 public HomeController(IMoneyExchangeService moneyExchangeService, ICheckCourse checkCourse, IRecordData recordData)
 {
     _moneyExchangeService = moneyExchangeService;
     _checkCourse          = checkCourse;
     _recordData           = recordData;
 }
示例#20
0
 internal override void WriteToVolumeDBRecord(IRecordData recordData)
 {
     base.WriteToVolumeDBRecord(recordData);
     recordData.AddField("IsContainer", true);
 }
示例#21
0
        private void WriteRecords(IVolumeDBRecord[] records, bool update)
        {
            List <string> sqlCommands = new List <string>();
            StringBuilder sqlcmd      = new StringBuilder();

            int changed = 0;

            try {
                if (update)
                {
                    foreach (IVolumeDBRecord record in records)
                    {
                        if (record.IsNew)
                        {
                            throw new InvalidOperationException("Database record can not be updated because it has not been inserted yet");
                        }

                        // reset stringbuilder
                        sqlcmd.Length = 0;

                        sqlcmd.Append("UPDATE ").Append(record.TableName).Append(" SET ");

                        int         n       = 0;
                        IRecordData recData = record.GetRecordData();
                        foreach (FieldnameValuePair pair in recData)
                        {
                            if (n > 0)
                            {
                                sqlcmd.Append(", ");
                            }
                            string val = SqlPrepareValue(pair.Value, true);
                            sqlcmd.Append(pair.Fieldname).Append(" = ").Append(val);
                            n++;
                        }

                        string[] primarykeyFields = record.PrimaryKeyFields;
                        if ((primarykeyFields != null) && (primarykeyFields.Length > 0))                           // single-record-tables (e.g. table DatabaseProperties) may not have a primary key
                        {
                            sqlcmd.Append(" WHERE ");
                            for (int i = 0; i < primarykeyFields.Length; i++)
                            {
                                if (i > 0)
                                {
                                    sqlcmd.Append(" AND ");
                                }
                                string pk = primarykeyFields[i];
                                sqlcmd.Append(pk).Append(" = ").Append(recData[pk]);
                            }
                        }

//						  string idField = record.TableIDField;
//						  if (!string.IsNullOrEmpty(idField)) // single-record-tables (e.g. table DatabaseProperties) may not have a primary key
//							  sqlcmd.Append(" WHERE ").Append(idField).Append(" = ").Append(recData[idField]);

                        sqlCommands.Add(sqlcmd.ToString());
                    }
                }
                else                     // insert

                {
                    StringBuilder fields = new StringBuilder();
                    StringBuilder values = new StringBuilder();

                    foreach (IVolumeDBRecord record in records)
                    {
                        if (!record.IsNew)
                        {
                            throw new InvalidOperationException("Database record has already been inserted");
                        }

                        // reset stringbuilders
                        sqlcmd.Length = 0;
                        fields.Length = 0;
                        values.Length = 0;

                        sqlcmd.Append("INSERT INTO ").Append(record.TableName).Append(' ');

                        int         n       = 0;
                        IRecordData recData = record.GetRecordData();
                        foreach (FieldnameValuePair pair in recData)
                        {
                            if (n > 0)
                            {
                                fields.Append(", ");
                                values.Append(", ");
                            }
                            string val = SqlPrepareValue(pair.Value, true);
                            fields.Append(pair.Fieldname);
                            values.Append(val);
                            n++;
                        }

                        sqlcmd.Append('(').Append(fields.ToString()).Append(") VALUES (").Append(values.ToString()).Append(')');
                        record.IsNew = false;                         // mark the record object as not-new
                        changed++;

                        sqlCommands.Add(sqlcmd.ToString());
                    }
                }

                if (sqlCommands.Count > 1)
                {
                    sql.ExecuteNonQuery(sqlCommands.ToArray());
                }
                else
                {
                    sql.ExecuteNonQuery(sqlCommands[0]);
                }
            } catch (Exception) {
                // undo changes
                if (!update)
                {
                    for (int i = 0; i < changed; records[i++].IsNew = true)
                    {
                        ;
                    }
                }
                throw;
            }
        }
示例#22
0
 internal override void ReadFromVolumeDBRecord(IRecordData recordData)
 {
     name			= Util.ReplaceDBNull<string>(	recordData["Name"], null);
     description		= Util.ReplaceDBNull<string>(	recordData["Description"], null);
     created			= Util.ReplaceDBNull<DateTime>(	recordData["Created"], DateTime.MinValue);
     version			= (int)(long)				  	recordData["Version"];
     guid			= (string)						recordData["GUID"];
 }
示例#23
0
        internal override void WriteToVolumeDBRecord(IRecordData recordData)
        {
            base.WriteToVolumeDBRecord(recordData);

            recordData.AddField("Location",			location);
            //recordData.AddField("CreatedDate",  m_createdDate);
            recordData.AddField("LastWriteTime",	lastWriteTime);
            //recordData.AddField("SymLinkTargetID",  symLinkTargetID < -1 ? -1 : symLinkTargetID);
            recordData.AddField("SymLinkTargetID",	symLinkTargetID);
        }
示例#24
0
 void IVolumeDBRecord.SetRecordData(IRecordData recordData)
 {
     ReadFromVolumeDBRecord(recordData);
 }
示例#25
0
 internal override void WriteToVolumeDBRecord(IRecordData recordData)
 {
     base.WriteToVolumeDBRecord(recordData);
     recordData.AddField("IsContainer", true);
 }
示例#26
0
 public RecordService(IRecordData record)
 {
     _datalayer = record;
 }
示例#27
0
 abstract void WriteToVolumeDBRecord(IRecordData recordData);
示例#28
0
 internal override void WriteToVolumeDBRecord(IRecordData recordData)
 {
     recordData.AddField("Name",			name);
     recordData.AddField("Description",	description);
     recordData.AddField("Created",		created);
     recordData.AddField("Version",		version);
     recordData.AddField("GUID",			guid);
 }
示例#29
0
        internal override void WriteToVolumeDBRecord(IRecordData recordData)
        {
            base.WriteToVolumeDBRecord(recordData);

            recordData.AddField("Files", files);
            recordData.AddField("Dirs",  dirs);
            recordData.AddField("Size",  size);
        }
示例#30
0
 internal override void WriteToVolumeDBRecord(IRecordData recordData)
 {
     recordData.AddField("VolumeID", volumeID);
     recordData.AddField("ItemID",	itemID);
     //recordData.AddField("RootID",  rootID);
     recordData.AddField("ParentID", parentID);
     recordData.AddField("ItemType", itemType);
     recordData.AddField("Name",		name);
     recordData.AddField("MimeType", mimeType);
     // NOTE : metadata can't be null since it is a struct
     recordData.AddField("MetaData", metaData.MetadataString);
     recordData.AddField("Note",		note);
     recordData.AddField("Keywords", keywords);
 }
示例#31
0
        //private static void ValidateFilename(string filename)
        //{
        //      if (filename == null)
        //          throw new ArgumentNullException("filename");
        //      if (filename.Length == 0)
        //          throw new ArgumentException("filename is empty");
        //}
        internal override void ReadFromVolumeDBRecord(IRecordData recordData)
        {
            base.ReadFromVolumeDBRecord(recordData);

            //filename	=	(string)				recordData["Filename"];
            //extension =	Util.ReplaceDBNull<string>(	recordData["Extension"],  null);
            size	  =   (long)				  		recordData["Size"];
            hash	  =   Util.ReplaceDBNull<string>(	recordData["Hash"],		null);
        }
示例#32
0
        public DnsEntry(DataBuffer buffer)
        {
            try
            {
                _domain = buffer.ReadDomainName();
                byte b = buffer.ReadByte();
                _recType   = (RecordType)buffer.ReadShortInt();
                _classType = buffer.ReadShortInt();
                _ttl       = buffer.ReadInt();

                int length = buffer.ReadByte();
                switch (_recType)
                {
                case RecordType.A: _data = new ARecord(buffer); break;

                case RecordType.NS: _data = new NSRecord(buffer); break;

                case RecordType.CNAME: _data = new CNameRecord(buffer); break;

                case RecordType.SOA: _data = new SoaRecord(buffer); break;

                case RecordType.MB: _data = new MBRecord(buffer); break;

                case RecordType.MG: _data = new MGRecord(buffer); break;

                case RecordType.MR: _data = new MRRecord(buffer); break;

                case RecordType.NULL: _data = new NullRecord(buffer, length); break;

                case RecordType.WKS: _data = new WksRecord(buffer, length); break;

                case RecordType.PTR: _data = new PtrRecord(buffer); break;

                case RecordType.HINFO: _data = new HInfoRecord(buffer, length); break;

                case RecordType.MINFO: _data = new MInfoRecord(buffer); break;

                case RecordType.MX: _data = new MXRecord(buffer); break;

                case RecordType.TXT: _data = new TxtRecord(buffer, length); break;

                case RecordType.RP: _data = new RPRecord(buffer); break;

                case RecordType.AFSDB: _data = new AfsdbRecord(buffer); break;

                case RecordType.X25: _data = new X25Record(buffer); break;

                case RecordType.ISDN: _data = new IsdnRecord(buffer); break;

                case RecordType.RT: _data = new RTRecord(buffer); break;

                case RecordType.NSAP: _data = new NsapRecord(buffer, length); break;

                case RecordType.SIG: _data = new SigRecord(buffer, length); break;

                case RecordType.KEY: _data = new KeyRecord(buffer, length); break;

                case RecordType.PX: _data = new PXRecord(buffer); break;

                case RecordType.AAAA: _data = new AAAARecord(buffer); break;

                case RecordType.LOC: _data = new LocRecord(buffer); break;

                case RecordType.SRV: _data = new SrvRecord(buffer); break;

                case RecordType.NAPTR: _data = new NaptrRecord(buffer); break;

                case RecordType.KX: _data = new KXRecord(buffer); break;

                case RecordType.A6: _data = new A6Record(buffer); break;

                case RecordType.DNAME: _data = new DNameRecord(buffer); break;

                case RecordType.DS: _data = new DSRecord(buffer, length); break;

                case RecordType.TKEY: _data = new TKeyRecord(buffer); break;

                case RecordType.TSIG: _data = new TSigRecord(buffer); break;

                default: throw new DnsQueryException("Invalid DNS Record Type in DNS Response", null);
                }
            }
            catch (Exception ex)
            {
                _data = new ExceptionRecord(ex.Message);
                throw ex;
            }
        }
示例#33
0
文件: Volume.cs 项目: pulb/basenji
        internal override void ReadFromVolumeDBRecord(IRecordData recordData)
        {
            volumeID	  = (long)						  	recordData["VolumeID"];
            title		  = Util.ReplaceDBNull<string>(		recordData["Title"], null);
            added		  = Util.ReplaceDBNull<DateTime>(	recordData["Added"], DateTime.MinValue);
            isHashed	  = (bool)						  	recordData["IsHashed"];

            archiveNo	  = Util.ReplaceDBNull<string>(		recordData["ArchiveNr"], null);
            driveType	  = (VolumeDriveType)(int)(long)  	recordData["DriveType"];
            loanedTo	  = Util.ReplaceDBNull<string>(		recordData["Loaned_To"], null);
            loanedDate	  = Util.ReplaceDBNull<DateTime>(	recordData["Loaned_Date"], DateTime.MinValue);
            returnDate	  = Util.ReplaceDBNull<DateTime>(	recordData["Return_Date"], DateTime.MinValue);
            category	  = Util.ReplaceDBNull<string>(		recordData["Category"], null);
            description   = Util.ReplaceDBNull<string>(		recordData["Description"], null);
            keywords	  = Util.ReplaceDBNull<string>(		recordData["Keywords"], null);
            //clientAppData   = Util.ReplaceDBNull<string>(		  recordData["ClientAppData"], null);
        }
示例#34
0
        //private static void ValidatePath(string path)
        //{
        //      if (path == null)
        //          throw new ArgumentNullException("path");
        //      if (path.Length == 0)
        //          throw new ArgumentException("path is emtpy");
        //}
        internal override void ReadFromVolumeDBRecord(IRecordData recordData)
        {
            base.ReadFromVolumeDBRecord(recordData);

            location		= Util.ReplaceDBNull<string>(	recordData["Location"],		null); /* root item doesnt have a location */
            //createdDate	= Util.ReplaceDBNull<DateTime>(	recordData["CreatedDate"],	DateTime.MinValue);
            lastWriteTime	= Util.ReplaceDBNull<DateTime>(	recordData["LastWriteTime"], DateTime.MinValue);
            symLinkTargetID = (long)						recordData["SymLinkTargetID"];
        }
示例#35
0
文件: Volume.cs 项目: pulb/basenji
        internal override void WriteToVolumeDBRecord(IRecordData recordData)
        {
            recordData.AddField("VolumeID",		volumeID);
            recordData.AddField("Title",		title);
            recordData.AddField("Added",		added);
            recordData.AddField("VolumeType",	volumeType);
            recordData.AddField("IsHashed",		isHashed);

            recordData.AddField("ArchiveNr",	archiveNo);
            recordData.AddField("DriveType",	driveType);
            recordData.AddField("Loaned_To",	loanedTo);
            recordData.AddField("Loaned_Date",	loanedDate);
            recordData.AddField("Return_Date",	returnDate);
            recordData.AddField("Category",		category);
            recordData.AddField("Description",	description);
            recordData.AddField("Keywords",		keywords);
            //recordData.AddField("ClientAppData",	  clientAppData);
        }
示例#36
0
 public RecordService(IRecordData recordData)
 {
     _recordData = recordData;
 }
示例#37
0
 abstract void ReadFromVolumeDBRecord(IRecordData recordData);
示例#38
0
 internal override void ReadFromVolumeDBRecord(IRecordData recordData)
 {
     volumeID	= (long)				  		recordData["VolumeID"];
     itemID		= (long)				  		recordData["ItemID"];
     //rootID	= (long)				  recordData["RootID"];
     parentID	= (long)				  		recordData["ParentID"];
     name		= Util.ReplaceDBNull<string>(	recordData["Name"],		null);
     mimeType	= Util.ReplaceDBNull<string>(	recordData["MimeType"],	null);
     metaData	= new MetadataStore(Util.ReplaceDBNull<string>(	recordData["MetaData"],	null));
     note		= Util.ReplaceDBNull<string>(	recordData["Note"],		null);
     keywords	= Util.ReplaceDBNull<string>(	recordData["Keywords"],	null);
 }
示例#39
0
        internal override void WriteToVolumeDBRecord(IRecordData recordData)
        {
            base.WriteToVolumeDBRecord(recordData);

            //recordData.AddField("Filename",  filename);
            //recordData.AddField("Extension", extension);
            recordData.AddField("Size",		 size);
            recordData.AddField("Hash",		 hash);
        }