blob: d6ef4cb57814ec392aba6aa48d5b19a34f607c94 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH
* Author: Constantin Ziesche (constantin.ziesche@bosch.com)
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
using BaSyx.Models.Core.AssetAdministrationShell.Generics;
using BaSyx.Models.Core.Common;
using System.Runtime.Serialization;
namespace BaSyx.Models.Core.AssetAdministrationShell.Implementations
{
[DataContract]
public class Blob : SubmodelElement, IBlob
{
public override ModelType ModelType => ModelType.Blob;
public string MimeType { get; set; }
public byte[] Value { get; set; }
public Blob(string idShort) : base(idShort)
{
Get = element => { return new ElementValue(Value, new DataType(DataObjectType.Base64Binary)); };
Set = (element, value) => { Value = value.Value as byte[]; };
}
}
}