Esempio n. 1
0
        public void AddOrUpdateAction(ResourceSubType resource)
        {
            var entity = _resourceSubTypeRepository.GetByID(resource.Id);

            if (entity != null)
            {
                _resourceSubTypeRepository.Detach(entity);
                _resourceSubTypeRepository.Update(resource);
            }
            else
            {
                _resourceSubTypeRepository.Insert(resource);
            }

            _resourceSubTypeRepository.Save();
        }
Esempio n. 2
0
 public Resource(ResourceType type, ResourceSubType subtype, int offset, int size)
 {
     MainRawDataType = type;
     SubRawDataType = subtype;
     RawDataOffset = offset;
     RawDataSize = size;
 }
Esempio n. 3
0
 public Resource(Stream stream)
 {
     BinaryReader br = new BinaryReader(stream);
     MainRawDataType = (ResourceType)br.ReadInt32();
     SubRawDataType = (ResourceSubType)br.ReadInt32();
     RawDataSize = br.ReadInt32();
     RawDataOffset = br.ReadInt32();
 }
Esempio n. 4
0
 public void Post([FromBody] ResourceSubType value)
 {
     _resourceSubtypeService.AddOrUpdateAction(value);
 }