IoTOnboardingService.OnboardingService.GetContentAsync C# (CSharp) Method

GetContentAsync() public method

public GetContentAsync ( AllJoynMessageInfo info ) : IAsyncOperation
info AllJoynMessageInfo
return IAsyncOperation
        public IAsyncOperation<IconGetContentResult> GetContentAsync(AllJoynMessageInfo info)
        {
            return Task.Run(async () =>
            {
                var fileProps = await _iconFile.GetBasicPropertiesAsync();
                var dataReader = new DataReader(await _iconFile.OpenSequentialReadAsync());
                await dataReader.LoadAsync((uint)fileProps.Size);

                var buffer = new byte[fileProps.Size];
                dataReader.ReadBytes(buffer);

                return IconGetContentResult.CreateSuccessResult(buffer);

            }).AsAsyncOperation();
        }