content
stringlengths
5
1.04M
avg_line_length
float64
1.75
12.9k
max_line_length
int64
2
244k
alphanum_fraction
float64
0
0.98
licenses
list
repository_name
stringlengths
7
92
path
stringlengths
3
249
size
int64
5
1.04M
lang
stringclasses
2 values
using System; using System.Text; using System.Collections.Generic; using System.Linq; using UnityEditor.VFX; using UnityEngine; using UnityEngine.VFX; using UnityEngine.Profiling; using UnityEngine.Rendering; using Object = UnityEngine.Object; namespace UnityEditor.VFX { struct VFXContextCompiledData { public VFXExpressionMapper cpuMapper; public VFXExpressionMapper gpuMapper; public VFXUniformMapper uniformMapper; public VFXMapping[] parameters; public int indexInShaderSource; } enum VFXCompilationMode { Edition, Runtime, } class VFXDependentBuffersData { public Dictionary<VFXData, int> attributeBuffers = new Dictionary<VFXData, int>(); public Dictionary<VFXData, int> stripBuffers = new Dictionary<VFXData, int>(); public Dictionary<VFXData, int> eventBuffers = new Dictionary<VFXData, int>(); } class VFXGraphCompiledData { public VFXGraphCompiledData(VFXGraph graph) { if (graph == null) throw new ArgumentNullException("VFXGraph cannot be null"); m_Graph = graph; } private struct GeneratedCodeData { public VFXContext context; public bool computeShader; public System.Text.StringBuilder content; public VFXCompilationMode compilMode; } private static VFXExpressionValueContainerDesc<T> CreateValueDesc<T>(VFXExpression exp, int expIndex) { var desc = new VFXExpressionValueContainerDesc<T>(); desc.value = exp.Get<T>(); return desc; } private void SetValueDesc<T>(VFXExpressionValueContainerDesc desc, VFXExpression exp) { ((VFXExpressionValueContainerDesc<T>)desc).value = exp.Get<T>(); } public uint FindReducedExpressionIndexFromSlotCPU(VFXSlot slot) { if (m_ExpressionGraph == null) { return uint.MaxValue; } var targetExpression = slot.GetExpression(); if (targetExpression == null) { return uint.MaxValue; } if (!m_ExpressionGraph.CPUExpressionsToReduced.ContainsKey(targetExpression)) { return uint.MaxValue; } var ouputExpression = m_ExpressionGraph.CPUExpressionsToReduced[targetExpression]; return (uint)m_ExpressionGraph.GetFlattenedIndex(ouputExpression); } private static void FillExpressionDescs(List<VFXExpressionDesc> outExpressionDescs, List<VFXExpressionValueContainerDesc> outValueDescs, VFXExpressionGraph graph) { var flatGraph = graph.FlattenedExpressions; var numFlattenedExpressions = flatGraph.Count; for (int i = 0; i < numFlattenedExpressions; ++i) { var exp = flatGraph[i]; // Must match data in C++ expression if (exp.Is(VFXExpression.Flags.Value)) { VFXExpressionValueContainerDesc value; switch (exp.valueType) { case VFXValueType.Float: value = CreateValueDesc<float>(exp, i); break; case VFXValueType.Float2: value = CreateValueDesc<Vector2>(exp, i); break; case VFXValueType.Float3: value = CreateValueDesc<Vector3>(exp, i); break; case VFXValueType.Float4: value = CreateValueDesc<Vector4>(exp, i); break; case VFXValueType.Int32: value = CreateValueDesc<int>(exp, i); break; case VFXValueType.Uint32: value = CreateValueDesc<uint>(exp, i); break; case VFXValueType.Texture2D: case VFXValueType.Texture2DArray: case VFXValueType.Texture3D: case VFXValueType.TextureCube: case VFXValueType.TextureCubeArray: value = CreateValueDesc<Texture>(exp, i); break; case VFXValueType.Matrix4x4: value = CreateValueDesc<Matrix4x4>(exp, i); break; case VFXValueType.Curve: value = CreateValueDesc<AnimationCurve>(exp, i); break; case VFXValueType.ColorGradient: value = CreateValueDesc<Gradient>(exp, i); break; case VFXValueType.Mesh: value = CreateValueDesc<Mesh>(exp, i); break; case VFXValueType.Boolean: value = CreateValueDesc<bool>(exp, i); break; default: throw new InvalidOperationException("Invalid type"); } value.expressionIndex = (uint)i; outValueDescs.Add(value); } outExpressionDescs.Add(new VFXExpressionDesc { op = exp.operation, data = exp.GetOperands(graph).ToArray(), }); } } private static void CollectExposedDesc(List<VFXMapping> outExposedParameters, string name, VFXSlot slot, VFXExpressionGraph graph) { var expression = slot.valueType != VFXValueType.None ? slot.GetInExpression() : null; if (expression != null) { var exprIndex = graph.GetFlattenedIndex(expression); if (exprIndex == -1) throw new InvalidOperationException("Unable to retrieve value from exposed for " + name); outExposedParameters.Add(new VFXMapping() { name = name, index = exprIndex }); } else { foreach (var child in slot.children) { CollectExposedDesc(outExposedParameters, name + "_" + child.name, child, graph); } } } private static void FillExposedDescs(List<VFXMapping> outExposedParameters, VFXExpressionGraph graph, IEnumerable<VFXParameter> parameters) { foreach (var parameter in parameters) { if (parameter.exposed && !parameter.isOutput) { CollectExposedDesc(outExposedParameters, parameter.exposedName, parameter.GetOutputSlot(0), graph); } } } private static void FillEventAttributeDescs(List<VFXLayoutElementDesc> eventAttributeDescs, VFXExpressionGraph graph, IEnumerable<VFXContext> contexts) { foreach (var context in contexts.Where(o => o.contextType == VFXContextType.Spawner)) { foreach (var linked in context.outputContexts) { var data = linked.GetData(); if (data) { foreach (var attribute in data.GetAttributes()) { if ((attribute.mode & VFXAttributeMode.ReadSource) != 0 && !eventAttributeDescs.Any(o => o.name == attribute.attrib.name)) { eventAttributeDescs.Add(new VFXLayoutElementDesc() { name = attribute.attrib.name, type = attribute.attrib.type }); } } } } } var structureLayoutTotalSize = (uint)eventAttributeDescs.Sum(e => (long)VFXExpression.TypeToSize(e.type)); var currentLayoutSize = 0u; var listWithOffset = new List<VFXLayoutElementDesc>(); eventAttributeDescs.ForEach(e => { e.offset.element = currentLayoutSize; e.offset.structure = structureLayoutTotalSize; currentLayoutSize += (uint)VFXExpression.TypeToSize(e.type); listWithOffset.Add(e); }); eventAttributeDescs.Clear(); eventAttributeDescs.AddRange(listWithOffset); } private static List<VFXContext> CollectContextParentRecursively(IEnumerable<VFXContext> inputList, ref SubgraphInfos subgraphContexts) { var contextEffectiveInputLinks = subgraphContexts.contextEffectiveInputLinks; var contextList = inputList.SelectMany(o => contextEffectiveInputLinks[o].SelectMany(t => t)).Select(t => t.context).Distinct().ToList(); if (contextList.Any(o => contextEffectiveInputLinks[o].Any())) { var parentContextList = CollectContextParentRecursively(contextList.Except(inputList), ref subgraphContexts); foreach (var context in parentContextList) { if (!contextList.Contains(context)) { contextList.Add(context); } } } return contextList; } private static VFXContext[] CollectSpawnersHierarchy(IEnumerable<VFXContext> vfxContext, ref SubgraphInfos subgraphContexts) { var initContext = vfxContext.Where(o => o.contextType == VFXContextType.Init).ToList(); var spawnerList = CollectContextParentRecursively(initContext, ref subgraphContexts); return spawnerList.Where(o => o.contextType == VFXContextType.Spawner).Reverse().ToArray(); } struct SpawnInfo { public int bufferIndex; public int systemIndex; } private static VFXCPUBufferData ComputeArrayOfStructureInitialData(IEnumerable<VFXLayoutElementDesc> layout) { var data = new VFXCPUBufferData(); foreach (var element in layout) { var attribute = VFXAttribute.AllAttribute.FirstOrDefault(o => o.name == element.name); bool useAttribute = attribute.name == element.name; if (element.type == VFXValueType.Boolean) { var v = useAttribute ? attribute.value.Get<bool>() : default(bool); data.PushBool(v); } else if (element.type == VFXValueType.Float) { var v = useAttribute ? attribute.value.Get<float>() : default(float); data.PushFloat(v); } else if (element.type == VFXValueType.Float2) { var v = useAttribute ? attribute.value.Get<Vector2>() : default(Vector2); data.PushFloat(v.x); data.PushFloat(v.y); } else if (element.type == VFXValueType.Float3) { var v = useAttribute ? attribute.value.Get<Vector3>() : default(Vector3); data.PushFloat(v.x); data.PushFloat(v.y); data.PushFloat(v.z); } else if (element.type == VFXValueType.Float4) { var v = useAttribute ? attribute.value.Get<Vector4>() : default(Vector4); data.PushFloat(v.x); data.PushFloat(v.y); data.PushFloat(v.z); data.PushFloat(v.w); } else if (element.type == VFXValueType.Int32) { var v = useAttribute ? attribute.value.Get<int>() : default(int); data.PushInt(v); } else if (element.type == VFXValueType.Uint32) { var v = useAttribute ? attribute.value.Get<uint>() : default(uint); data.PushUInt(v); } else { throw new NotImplementedException(); } } return data; } void RecursePutSubgraphParent(Dictionary<VFXSubgraphContext, VFXSubgraphContext> parents, List<VFXSubgraphContext> subgraphs, VFXSubgraphContext subgraph) { foreach (var subSubgraph in subgraph.subChildren.OfType<VFXSubgraphContext>().Where(t => t.subgraph != null)) { subgraphs.Add(subSubgraph); parents[subSubgraph] = subgraph; RecursePutSubgraphParent(parents, subgraphs, subSubgraph); } } static List<VFXContextLink>[] ComputeContextEffectiveLinks(VFXContext context, ref SubgraphInfos subgraphInfos) { List<VFXContextLink>[] result = new List<VFXContextLink>[context.inputFlowSlot.Length]; Dictionary<string, int> eventNameIndice = new Dictionary<string, int>(); for (int i = 0; i < context.inputFlowSlot.Length; ++i) { result[i] = new List<VFXContextLink>(); VFXSubgraphContext parentSubgraph = null; subgraphInfos.spawnerSubgraph.TryGetValue(context, out parentSubgraph); List<VFXContext> subgraphAncestors = new List<VFXContext>(); subgraphAncestors.Add(context); while (parentSubgraph != null) { subgraphAncestors.Add(parentSubgraph); if (!subgraphInfos.subgraphParents.TryGetValue(parentSubgraph, out parentSubgraph)) { parentSubgraph = null; } } List<List<int>> defaultEventPaths = new List<List<int>>(); defaultEventPaths.Add(new List<int>(new int[] { i })); List<List<int>> newEventPaths = new List<List<int>>(); var usedContexts = new List<VFXContext>(); for (int j = 0; j < subgraphAncestors.Count; ++j) { var sg = subgraphAncestors[j]; var nextSg = j < subgraphAncestors.Count - 1 ? subgraphAncestors[j + 1] as VFXSubgraphContext : null; foreach (var path in defaultEventPaths) { int currentFlowIndex = path.Last(); var eventSlot = sg.inputFlowSlot[currentFlowIndex]; var eventSlotSpawners = eventSlot.link.Where(t => !(t.context is VFXBasicEvent)); if (eventSlotSpawners.Any()) { foreach (var evt in eventSlotSpawners) { result[i].Add(evt); } } var eventSlotEvents = eventSlot.link.Where(t => t.context is VFXBasicEvent); if (eventSlotEvents.Any()) { foreach (var evt in eventSlotEvents) { string eventName = (evt.context as VFXBasicEvent).eventName; switch (eventName) { case VisualEffectAsset.PlayEventName: if (nextSg != null) newEventPaths.Add(path.Concat(new int[] { 0 }).ToList()); else result[i].Add(evt); break; case VisualEffectAsset.StopEventName: if (nextSg != null) newEventPaths.Add(path.Concat(new int[] { 1 }).ToList()); else result[i].Add(evt); break; default: { if (nextSg != null) { int eventIndex = nextSg.GetInputFlowIndex(eventName); if (eventIndex != -1) newEventPaths.Add(path.Concat(new int[] { eventIndex }).ToList()); } else { result[i].Add(evt); } } break; } } } else if (!eventSlot.link.Any()) { if (!(sg is VFXSubgraphContext)) { if (nextSg != null) { int fixedSlotIndex = currentFlowIndex > 1 ? currentFlowIndex : nextSg.GetInputFlowIndex(currentFlowIndex == 1 ? VisualEffectAsset.StopEventName : VisualEffectAsset.PlayEventName); if (fixedSlotIndex >= 0) newEventPaths.Add(path.Concat(new int[] { fixedSlotIndex }).ToList()); } else newEventPaths.Add(path.Concat(new int[] { currentFlowIndex }).ToList()); } else { var sgsg = sg as VFXSubgraphContext; var eventName = sgsg.GetInputFlowName(currentFlowIndex); var eventCtx = sgsg.GetEventContext(eventName); if (eventCtx != null) result[i].Add(new VFXContextLink() { slotIndex = 0, context = eventCtx }); } } } defaultEventPaths.Clear(); defaultEventPaths.AddRange(newEventPaths); newEventPaths.Clear(); } } return result; } private static void FillSpawner(Dictionary<VFXContext, SpawnInfo> outContextSpawnToSpawnInfo, List<VFXCPUBufferDesc> outCpuBufferDescs, List<VFXEditorSystemDesc> outSystemDescs, IEnumerable<VFXContext> contexts, VFXExpressionGraph graph, List<VFXLayoutElementDesc> globalEventAttributeDescs, Dictionary<VFXContext, VFXContextCompiledData> contextToCompiledData, ref SubgraphInfos subgraphInfos) { var spawners = CollectSpawnersHierarchy(contexts, ref subgraphInfos); foreach (var it in spawners.Select((spawner, index) => new { spawner, index })) { outContextSpawnToSpawnInfo.Add(it.spawner, new SpawnInfo() { bufferIndex = outCpuBufferDescs.Count, systemIndex = it.index }); outCpuBufferDescs.Add(new VFXCPUBufferDesc() { capacity = 1u, stride = globalEventAttributeDescs.First().offset.structure, layout = globalEventAttributeDescs.ToArray(), initialData = ComputeArrayOfStructureInitialData(globalEventAttributeDescs) }); } foreach (var spawnContext in spawners) { var buffers = new List<VFXMapping>(); buffers.Add(new VFXMapping() { index = outContextSpawnToSpawnInfo[spawnContext].bufferIndex, name = "spawner_output" }); for (int indexSlot = 0; indexSlot < 2 && indexSlot < spawnContext.inputFlowSlot.Length; ++indexSlot) { foreach (var input in subgraphInfos.contextEffectiveInputLinks[spawnContext][indexSlot]) { var inputContext = input.context; if (outContextSpawnToSpawnInfo.ContainsKey(inputContext)) { buffers.Add(new VFXMapping() { index = outContextSpawnToSpawnInfo[inputContext].bufferIndex, name = "spawner_input_" + (indexSlot == 0 ? "OnPlay" : "OnStop") }); } } } var contextData = contextToCompiledData[spawnContext]; var contextExpressions = contextData.cpuMapper.CollectExpression(-1); var systemValueMappings = new List<VFXMapping>(); foreach (var contextExpression in contextExpressions) { var expressionIndex = graph.GetFlattenedIndex(contextExpression.exp); systemValueMappings.Add(new VFXMapping(contextExpression.name, expressionIndex)); } outSystemDescs.Add(new VFXEditorSystemDesc() { values = systemValueMappings.ToArray(), buffers = buffers.ToArray(), capacity = 0u, flags = VFXSystemFlag.SystemDefault, layer = uint.MaxValue, tasks = spawnContext.activeFlattenedChildrenWithImplicit.Select((b, index) => { var spawnerBlock = b as VFXAbstractSpawner; if (spawnerBlock == null) { throw new InvalidCastException("Unexpected block type in spawnerContext"); } if (spawnerBlock.spawnerType == VFXTaskType.CustomCallbackSpawner && spawnerBlock.customBehavior == null) { throw new InvalidOperationException("VFXAbstractSpawner excepts a custom behavior for custom callback type"); } if (spawnerBlock.spawnerType != VFXTaskType.CustomCallbackSpawner && spawnerBlock.customBehavior != null) { throw new InvalidOperationException("VFXAbstractSpawner only expects a custom behavior for custom callback type"); } var cpuExpression = contextData.cpuMapper.CollectExpression(index, false).Select(o => { return new VFXMapping { index = graph.GetFlattenedIndex(o.exp), name = o.name }; }).ToArray(); Object processor = null; if (spawnerBlock.customBehavior != null) { var assets = AssetDatabase.FindAssets("t:TextAsset " + spawnerBlock.customBehavior.Name); if (assets.Length != 1) { // AssetDatabase.FindAssets will not search in package by default. Search in our package explicitely assets = AssetDatabase.FindAssets("t:TextAsset " + spawnerBlock.customBehavior.Name, new string[] { VisualEffectGraphPackageInfo.assetPackagePath }); if (assets.Length != 1) { throw new InvalidOperationException("Unable to find the definition .cs file for " + spawnerBlock.customBehavior + " Make sure that the class name and file name match"); } } var assetPath = AssetDatabase.GUIDToAssetPath(assets[0]); processor = AssetDatabase.LoadAssetAtPath<TextAsset>(assetPath); } return new VFXEditorTaskDesc { type = (UnityEngine.VFX.VFXTaskType)spawnerBlock.spawnerType, buffers = new VFXMapping[0], values = cpuExpression.ToArray(), parameters = contextData.parameters, externalProcessor = processor }; }).ToArray() }); } } struct SubgraphInfos { public Dictionary<VFXSubgraphContext, VFXSubgraphContext> subgraphParents; public Dictionary<VFXContext, VFXSubgraphContext> spawnerSubgraph; public List<VFXSubgraphContext> subgraphs; public Dictionary<VFXContext, List<VFXContextLink>[]> contextEffectiveInputLinks; public List<VFXContextLink> GetContextEffectiveOutputLinks(VFXContext context, int slot) { List<VFXContextLink> effectiveOuts = new List<VFXContextLink>(); foreach (var kv in contextEffectiveInputLinks) { for (int i = 0; i < kv.Value.Length; ++i) { foreach (var link in kv.Value[i]) { if (link.context == context && link.slotIndex == slot) effectiveOuts.Add(new VFXContextLink() { context = kv.Key, slotIndex = i }); } } } return effectiveOuts; } } private static void FillEvent(List<VFXEventDesc> outEventDesc, Dictionary<VFXContext, SpawnInfo> contextSpawnToSpawnInfo, IEnumerable<VFXContext> contexts, ref SubgraphInfos subgraphInfos) { var contextEffectiveInputLinks = subgraphInfos.contextEffectiveInputLinks; var allPlayNotLinked = contextSpawnToSpawnInfo.Where(o => !contextEffectiveInputLinks[o.Key][0].Any()).Select(o => (uint)o.Value.systemIndex).ToList(); var allStopNotLinked = contextSpawnToSpawnInfo.Where(o => !contextEffectiveInputLinks[o.Key][1].Any()).Select(o => (uint)o.Value.systemIndex).ToList(); var eventDescTemp = new[] { new { eventName = "OnPlay", playSystems = allPlayNotLinked, stopSystems = new List<uint>() }, new { eventName = "OnStop", playSystems = new List<uint>(), stopSystems = allStopNotLinked }, }.ToList(); var specialNames = new HashSet<string>(new string[] {VisualEffectAsset.PlayEventName, VisualEffectAsset.StopEventName}); var events = contexts.Where(o => o.contextType == VFXContextType.Event); foreach (var evt in events) { var eventName = (evt as VFXBasicEvent).eventName; if (subgraphInfos.spawnerSubgraph.ContainsKey(evt) && specialNames.Contains(eventName)) continue; List<VFXContextLink> effecitveOuts = subgraphInfos.GetContextEffectiveOutputLinks(evt, 0); foreach (var link in effecitveOuts) { if (contextSpawnToSpawnInfo.ContainsKey(link.context)) { var eventIndex = eventDescTemp.FindIndex(o => o.eventName == eventName); if (eventIndex == -1) { eventIndex = eventDescTemp.Count; eventDescTemp.Add(new { eventName = eventName, playSystems = new List<uint>(), stopSystems = new List<uint>(), }); } var startSystem = link.slotIndex == 0; var spawnerIndex = (uint)contextSpawnToSpawnInfo[link.context].systemIndex; if (startSystem) { eventDescTemp[eventIndex].playSystems.Add(spawnerIndex); } else { eventDescTemp[eventIndex].stopSystems.Add(spawnerIndex); } } } } outEventDesc.Clear(); outEventDesc.AddRange(eventDescTemp.Select(o => new VFXEventDesc() { name = o.eventName, startSystems = o.playSystems.ToArray(), stopSystems = o.stopSystems.ToArray() })); } private static void GenerateShaders(List<GeneratedCodeData> outGeneratedCodeData, VFXExpressionGraph graph, IEnumerable<VFXContext> contexts, Dictionary<VFXContext, VFXContextCompiledData> contextToCompiledData, VFXCompilationMode compilationMode) { Profiler.BeginSample("VFXEditor.GenerateShaders"); try { foreach (var context in contexts) { var gpuMapper = graph.BuildGPUMapper(context); var uniformMapper = new VFXUniformMapper(gpuMapper, context.doesGenerateShader); // Add gpu and uniform mapper var contextData = contextToCompiledData[context]; contextData.gpuMapper = gpuMapper; contextData.uniformMapper = uniformMapper; contextToCompiledData[context] = contextData; if (context.doesGenerateShader) { var generatedContent = VFXCodeGenerator.Build(context, compilationMode, contextData); if (generatedContent != null) { outGeneratedCodeData.Add(new GeneratedCodeData() { context = context, computeShader = context.codeGeneratorCompute, compilMode = compilationMode, content = generatedContent }); } } } } finally { Profiler.EndSample(); } } private static void SaveShaderFiles(VisualEffectResource resource, List<GeneratedCodeData> generatedCodeData, Dictionary<VFXContext, VFXContextCompiledData> contextToCompiledData) { Profiler.BeginSample("VFXEditor.SaveShaderFiles"); try { VFXShaderSourceDesc[] descs = new VFXShaderSourceDesc[generatedCodeData.Count]; for (int i = 0; i < generatedCodeData.Count; ++i) { var generated = generatedCodeData[i]; var fileName = generated.context.fileName; if (!generated.computeShader) { generated.content.Insert(0, "Shader \"" + generated.context.shaderName + "\"\n"); } descs[i].source = generated.content.ToString(); descs[i].name = fileName; descs[i].compute = generated.computeShader; } resource.shaderSources = descs; for (int i = 0; i < generatedCodeData.Count; ++i) { var generated = generatedCodeData[i]; var contextData = contextToCompiledData[generated.context]; contextData.indexInShaderSource = i; contextToCompiledData[generated.context] = contextData; } } finally { Profiler.EndSample(); } } public void FillDependentBuffer( IEnumerable<VFXData> compilableData, List<VFXGPUBufferDesc> bufferDescs, VFXDependentBuffersData buffers) { // TODO This should be in VFXDataParticle foreach (var data in compilableData.OfType<VFXDataParticle>()) { int attributeBufferIndex = -1; if (data.attributeBufferSize > 0) { attributeBufferIndex = bufferDescs.Count; bufferDescs.Add(data.attributeBufferDesc); } buffers.attributeBuffers.Add(data, attributeBufferIndex); int stripBufferIndex = -1; if (data.hasStrip) { stripBufferIndex = bufferDescs.Count; uint stripCapacity = (uint)data.GetSettingValue("stripCapacity"); bufferDescs.Add(new VFXGPUBufferDesc() { type = ComputeBufferType.Default, size = stripCapacity * 4, stride = 4 }); } buffers.stripBuffers.Add(data, stripBufferIndex); } //Prepare GPU event buffer foreach (var data in compilableData.SelectMany(o => o.dependenciesOut).Distinct().OfType<VFXDataParticle>()) { var eventBufferIndex = -1; uint capacity = (uint)data.GetSettingValue("capacity"); if (capacity > 0) { eventBufferIndex = bufferDescs.Count; bufferDescs.Add(new VFXGPUBufferDesc() { type = ComputeBufferType.Append, size = capacity, stride = 4 }); } buffers.eventBuffers.Add(data, eventBufferIndex); } } VFXRendererSettings GetRendererSettings(VFXRendererSettings initialSettings, IEnumerable<IVFXSubRenderer> subRenderers) { var settings = initialSettings; settings.shadowCastingMode = subRenderers.Any(r => r.hasShadowCasting) ? ShadowCastingMode.On : ShadowCastingMode.Off; settings.motionVectorGenerationMode = subRenderers.Any(r => r.hasMotionVector) ? MotionVectorGenerationMode.Object : MotionVectorGenerationMode.Camera; return settings; } private class VFXImplicitContextOfExposedExpression : VFXContext { private VFXExpressionMapper mapper; public VFXImplicitContextOfExposedExpression() : base(VFXContextType.None, VFXDataType.None, VFXDataType.None) {} private static void CollectExposedExpression(List<VFXExpression> expressions, VFXSlot slot) { var expression = slot.valueType != VFXValueType.None ? slot.GetInExpression() : null; if (expression != null) expressions.Add(expression); else { foreach (var child in slot.children) CollectExposedExpression(expressions, child); } } public void FillExpression(VFXGraph graph) { var allExposedParameter = graph.children.OfType<VFXParameter>().Where(o => o.exposed); var expressionsList = new List<VFXExpression>(); foreach (var parameter in allExposedParameter) CollectExposedExpression(expressionsList, parameter.outputSlots[0]); mapper = new VFXExpressionMapper(); for (int i = 0; i < expressionsList.Count; ++i) mapper.AddExpression(expressionsList[i], "ImplicitExposedExpression", i); } public override VFXExpressionMapper GetExpressionMapper(VFXDeviceTarget target) { return target == VFXDeviceTarget.CPU ? mapper : null; } } static public Action<VisualEffectResource, bool> k_FnVFXResource_SetCompileInitialVariants = Find_FnVFXResource_SetCompileInitialVariants(); static Action<VisualEffectResource, bool> Find_FnVFXResource_SetCompileInitialVariants() { var property = typeof(VisualEffectResource).GetProperty("compileInitialVariants"); if (property != null) { return delegate(VisualEffectResource rsc, bool value) { property.SetValue(rsc, value, null); }; } return null; } void ComputeEffectiveInputLinks(ref SubgraphInfos subgraphInfos, IEnumerable<VFXContext> compilableContexts) { var contextEffectiveInputLinks = subgraphInfos.contextEffectiveInputLinks; foreach (var context in compilableContexts.Where(t => !(t is VFXSubgraphContext))) { contextEffectiveInputLinks[context] = ComputeContextEffectiveLinks(context, ref subgraphInfos); ComputeEffectiveInputLinks(ref subgraphInfos, contextEffectiveInputLinks[context].SelectMany(t => t).Select(t => t.context).Where(t => !contextEffectiveInputLinks.ContainsKey(t))); } } public void Compile(VFXCompilationMode compilationMode, bool forceShaderValidation) { // Prevent doing anything ( and especially showing progesses ) in an empty graph. if (m_Graph.children.Count() < 1) { // Cleaning if (m_Graph.visualEffectResource != null) m_Graph.visualEffectResource.ClearRuntimeData(); m_ExpressionGraph = new VFXExpressionGraph(); m_ExpressionValues = new VFXExpressionValueContainerDesc[] {}; return; } Profiler.BeginSample("VFXEditor.CompileAsset"); float nbSteps = 12.0f; string assetPath = AssetDatabase.GetAssetPath(visualEffectResource); string progressBarTitle = "Compiling " + assetPath; try { EditorUtility.DisplayProgressBar(progressBarTitle, "Collecting dependencies", 0 / nbSteps); var models = new HashSet<ScriptableObject>(); m_Graph.CollectDependencies(models, false); var contexts = models.OfType<VFXContext>().ToArray(); foreach (var c in contexts) // Unflag all contexts c.MarkAsCompiled(false); IEnumerable<VFXContext> compilableContexts = contexts.Where(c => c.CanBeCompiled()).ToArray(); var compilableData = models.OfType<VFXData>().Where(d => d.CanBeCompiled()); IEnumerable<VFXContext> implicitContexts = Enumerable.Empty<VFXContext>(); foreach (var d in compilableData) // Flag compiled contexts implicitContexts = implicitContexts.Concat(d.InitImplicitContexts()); compilableContexts = compilableContexts.Concat(implicitContexts.ToArray()); foreach (var c in compilableContexts) // Flag compiled contexts c.MarkAsCompiled(true); EditorUtility.DisplayProgressBar(progressBarTitle, "Collecting attributes", 1 / nbSteps); foreach (var data in compilableData) data.CollectAttributes(); EditorUtility.DisplayProgressBar(progressBarTitle, "Process dependencies", 2 / nbSteps); foreach (var data in compilableData) data.ProcessDependencies(); EditorUtility.DisplayProgressBar(progressBarTitle, "Compiling expression Graph", 3 / nbSteps); m_ExpressionGraph = new VFXExpressionGraph(); var exposedExpressionContext = ScriptableObject.CreateInstance<VFXImplicitContextOfExposedExpression>(); exposedExpressionContext.FillExpression(m_Graph); //Force all exposed expression to be visible, only for registering in CompileExpressions var expressionContextOptions = compilationMode == VFXCompilationMode.Runtime ? VFXExpressionContextOption.ConstantFolding : VFXExpressionContextOption.Reduction; m_ExpressionGraph.CompileExpressions(compilableContexts.Concat(new VFXContext[] { exposedExpressionContext }), expressionContextOptions); EditorUtility.DisplayProgressBar(progressBarTitle, "Generating bytecode", 4 / nbSteps); var expressionDescs = new List<VFXExpressionDesc>(); var valueDescs = new List<VFXExpressionValueContainerDesc>(); FillExpressionDescs(expressionDescs, valueDescs, m_ExpressionGraph); Dictionary<VFXContext, VFXContextCompiledData> contextToCompiledData = new Dictionary<VFXContext, VFXContextCompiledData>(); foreach (var context in compilableContexts) contextToCompiledData.Add(context, new VFXContextCompiledData()); EditorUtility.DisplayProgressBar(progressBarTitle, "Generating mappings", 5 / nbSteps); foreach (var context in compilableContexts) { var cpuMapper = m_ExpressionGraph.BuildCPUMapper(context); var contextData = contextToCompiledData[context]; contextData.cpuMapper = cpuMapper; contextData.parameters = context.additionalMappings.ToArray(); contextToCompiledData[context] = contextData; } var exposedParameterDescs = new List<VFXMapping>(); FillExposedDescs(exposedParameterDescs, m_ExpressionGraph, m_Graph.children.OfType<VFXParameter>()); var globalEventAttributeDescs = new List<VFXLayoutElementDesc>() { new VFXLayoutElementDesc() { name = "spawnCount", type = VFXValueType.Float } }; FillEventAttributeDescs(globalEventAttributeDescs, m_ExpressionGraph, compilableContexts); SubgraphInfos subgraphInfos; subgraphInfos.subgraphParents = new Dictionary<VFXSubgraphContext, VFXSubgraphContext>(); subgraphInfos.subgraphs = new List<VFXSubgraphContext>(); foreach (var subgraph in m_Graph.children.OfType<VFXSubgraphContext>().Where(t => t.subgraph != null)) { subgraphInfos.subgraphs.Add(subgraph); RecursePutSubgraphParent(subgraphInfos.subgraphParents, subgraphInfos.subgraphs, subgraph); } subgraphInfos.spawnerSubgraph = new Dictionary<VFXContext, VFXSubgraphContext>(); foreach (var subgraph in subgraphInfos.subgraphs) { foreach (var spawner in subgraph.subChildren.OfType<VFXContext>()) subgraphInfos.spawnerSubgraph.Add(spawner, subgraph); } subgraphInfos.contextEffectiveInputLinks = new Dictionary<VFXContext, List<VFXContextLink>[]>(); ComputeEffectiveInputLinks(ref subgraphInfos, compilableContexts.OfType<VFXBasicInitialize>()); EditorUtility.DisplayProgressBar(progressBarTitle, "Generating Attribute layouts", 6 / nbSteps); foreach (var data in compilableData) data.GenerateAttributeLayout(subgraphInfos.contextEffectiveInputLinks); var generatedCodeData = new List<GeneratedCodeData>(); EditorUtility.DisplayProgressBar(progressBarTitle, "Generating shaders", 7 / nbSteps); GenerateShaders(generatedCodeData, m_ExpressionGraph, compilableContexts, contextToCompiledData, compilationMode); EditorUtility.DisplayProgressBar(progressBarTitle, "Saving shaders", 8 / nbSteps); SaveShaderFiles(m_Graph.visualEffectResource, generatedCodeData, contextToCompiledData); var bufferDescs = new List<VFXGPUBufferDesc>(); var temporaryBufferDescs = new List<VFXTemporaryGPUBufferDesc>(); var cpuBufferDescs = new List<VFXCPUBufferDesc>(); var systemDescs = new List<VFXEditorSystemDesc>(); EditorUtility.DisplayProgressBar(progressBarTitle, "Generating systems", 9 / nbSteps); cpuBufferDescs.Add(new VFXCPUBufferDesc() { capacity = 1u, layout = globalEventAttributeDescs.ToArray(), stride = globalEventAttributeDescs.First().offset.structure, initialData = ComputeArrayOfStructureInitialData(globalEventAttributeDescs) }); var contextSpawnToSpawnInfo = new Dictionary<VFXContext, SpawnInfo>(); FillSpawner(contextSpawnToSpawnInfo, cpuBufferDescs, systemDescs, compilableContexts, m_ExpressionGraph, globalEventAttributeDescs, contextToCompiledData, ref subgraphInfos); var eventDescs = new List<VFXEventDesc>(); FillEvent(eventDescs, contextSpawnToSpawnInfo, compilableContexts, ref subgraphInfos); var dependentBuffersData = new VFXDependentBuffersData(); FillDependentBuffer(compilableData, bufferDescs, dependentBuffersData); var contextSpawnToBufferIndex = contextSpawnToSpawnInfo.Select(o => new { o.Key, o.Value.bufferIndex }).ToDictionary(o => o.Key, o => o.bufferIndex); foreach (var data in compilableData) { data.FillDescs(bufferDescs, temporaryBufferDescs, systemDescs, m_ExpressionGraph, contextToCompiledData, contextSpawnToBufferIndex, dependentBuffersData, subgraphInfos.contextEffectiveInputLinks); } // Update renderer settings VFXRendererSettings rendererSettings = GetRendererSettings(m_Graph.visualEffectResource.rendererSettings, compilableContexts.OfType<IVFXSubRenderer>()); m_Graph.visualEffectResource.rendererSettings = rendererSettings; EditorUtility.DisplayProgressBar(progressBarTitle, "Setting up systems", 10 / nbSteps); var expressionSheet = new VFXExpressionSheet(); expressionSheet.expressions = expressionDescs.ToArray(); expressionSheet.values = valueDescs.OrderBy(o => o.expressionIndex).ToArray(); expressionSheet.exposed = exposedParameterDescs.OrderBy(o => o.name).ToArray(); m_Graph.visualEffectResource.SetRuntimeData(expressionSheet, systemDescs.ToArray(), eventDescs.ToArray(), bufferDescs.ToArray(), cpuBufferDescs.ToArray(), temporaryBufferDescs.ToArray()); m_ExpressionValues = expressionSheet.values; if (k_FnVFXResource_SetCompileInitialVariants != null) { k_FnVFXResource_SetCompileInitialVariants(m_Graph.visualEffectResource, forceShaderValidation); } } catch (Exception e) { VisualEffectAsset asset = null; if (m_Graph.visualEffectResource != null) asset = m_Graph.visualEffectResource.asset; Debug.LogError(string.Format("{2} : Exception while compiling expression graph: {0}: {1}", e, e.StackTrace, (asset != null) ? asset.name : "(Null Asset)"), asset); // Cleaning if (m_Graph.visualEffectResource != null) m_Graph.visualEffectResource.ClearRuntimeData(); m_ExpressionGraph = new VFXExpressionGraph(); m_ExpressionValues = new VFXExpressionValueContainerDesc[] {}; } finally { EditorUtility.DisplayProgressBar(progressBarTitle, "Importing VFX", 11 / nbSteps); Profiler.BeginSample("VFXEditor.CompileAsset:ImportAsset"); AssetDatabase.ImportAsset(assetPath, ImportAssetOptions.ForceUpdate); //This should compile the shaders on the C++ size Profiler.EndSample(); Profiler.EndSample(); EditorUtility.ClearProgressBar(); } } public void UpdateValues() { var flatGraph = m_ExpressionGraph.FlattenedExpressions; var numFlattenedExpressions = flatGraph.Count; int descIndex = 0; for (int i = 0; i < numFlattenedExpressions; ++i) { var exp = flatGraph[i]; if (exp.Is(VFXExpression.Flags.Value)) { var desc = m_ExpressionValues[descIndex++]; if (desc.expressionIndex != i) throw new InvalidOperationException(); switch (exp.valueType) { case VFXValueType.Float: SetValueDesc<float>(desc, exp); break; case VFXValueType.Float2: SetValueDesc<Vector2>(desc, exp); break; case VFXValueType.Float3: SetValueDesc<Vector3>(desc, exp); break; case VFXValueType.Float4: SetValueDesc<Vector4>(desc, exp); break; case VFXValueType.Int32: SetValueDesc<int>(desc, exp); break; case VFXValueType.Uint32: SetValueDesc<uint>(desc, exp); break; case VFXValueType.Texture2D: case VFXValueType.Texture2DArray: case VFXValueType.Texture3D: case VFXValueType.TextureCube: case VFXValueType.TextureCubeArray: SetValueDesc<Texture>(desc, exp); break; case VFXValueType.Matrix4x4: SetValueDesc<Matrix4x4>(desc, exp); break; case VFXValueType.Curve: SetValueDesc<AnimationCurve>(desc, exp); break; case VFXValueType.ColorGradient: SetValueDesc<Gradient>(desc, exp); break; case VFXValueType.Mesh: SetValueDesc<Mesh>(desc, exp); break; case VFXValueType.Boolean: SetValueDesc<bool>(desc, exp); break; default: throw new InvalidOperationException("Invalid type"); } } } m_Graph.visualEffectResource.SetValueSheet(m_ExpressionValues); } public VisualEffectResource visualEffectResource { get { if (m_Graph != null) { return m_Graph.visualEffectResource; } return null; } } private VFXGraph m_Graph; [NonSerialized] private VFXExpressionGraph m_ExpressionGraph; [NonSerialized] private VFXExpressionValueContainerDesc[] m_ExpressionValues; } }
47.469124
255
0.540443
[ "MIT" ]
Clear-Voiz/Spell
SpellDuel/Library/PackageCache/com.unity.visualeffectgraph@7.7.1/Editor/Compiler/VFXGraphCompiledData.cs
51,504
C#
using System; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; namespace FastFood.Data.Migrations { public partial class Initial : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Categories", columns: table => new { Id = table.Column<int>(nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), Name = table.Column<string>(maxLength: 30, nullable: false) }, constraints: table => { table.PrimaryKey("PK_Categories", x => x.Id); }); migrationBuilder.CreateTable( name: "Positions", columns: table => new { Id = table.Column<int>(nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), Name = table.Column<string>(maxLength: 30, nullable: false) }, constraints: table => { table.PrimaryKey("PK_Positions", x => x.Id); }); migrationBuilder.CreateTable( name: "Items", columns: table => new { Id = table.Column<int>(nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), Name = table.Column<string>(maxLength: 30, nullable: false), CategoryId = table.Column<int>(nullable: false), Price = table.Column<decimal>(nullable: false) }, constraints: table => { table.PrimaryKey("PK_Items", x => x.Id); table.ForeignKey( name: "FK_Items_Categories_CategoryId", column: x => x.CategoryId, principalTable: "Categories", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "Employees", columns: table => new { Id = table.Column<int>(nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), Name = table.Column<string>(maxLength: 30, nullable: false), Age = table.Column<int>(nullable: false), PositionId = table.Column<int>(nullable: false) }, constraints: table => { table.PrimaryKey("PK_Employees", x => x.Id); table.ForeignKey( name: "FK_Employees_Positions_PositionId", column: x => x.PositionId, principalTable: "Positions", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "Orders", columns: table => new { Id = table.Column<int>(nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), Customer = table.Column<string>(nullable: false), DateTime = table.Column<DateTime>(nullable: false), Type = table.Column<int>(nullable: false), EmployeeId = table.Column<int>(nullable: false) }, constraints: table => { table.PrimaryKey("PK_Orders", x => x.Id); table.ForeignKey( name: "FK_Orders_Employees_EmployeeId", column: x => x.EmployeeId, principalTable: "Employees", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "OrderItems", columns: table => new { OrderId = table.Column<int>(nullable: false), ItemId = table.Column<int>(nullable: false), Quantity = table.Column<int>(nullable: false) }, constraints: table => { table.PrimaryKey("PK_OrderItems", x => new { x.ItemId, x.OrderId }); table.ForeignKey( name: "FK_OrderItems_Items_ItemId", column: x => x.ItemId, principalTable: "Items", principalColumn: "Id", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_OrderItems_Orders_OrderId", column: x => x.OrderId, principalTable: "Orders", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateIndex( name: "IX_Employees_PositionId", table: "Employees", column: "PositionId"); migrationBuilder.CreateIndex( name: "IX_Items_CategoryId", table: "Items", column: "CategoryId"); migrationBuilder.CreateIndex( name: "IX_Items_Name", table: "Items", column: "Name", unique: true); migrationBuilder.CreateIndex( name: "IX_OrderItems_OrderId", table: "OrderItems", column: "OrderId"); migrationBuilder.CreateIndex( name: "IX_Orders_EmployeeId", table: "Orders", column: "EmployeeId"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "OrderItems"); migrationBuilder.DropTable( name: "Items"); migrationBuilder.DropTable( name: "Orders"); migrationBuilder.DropTable( name: "Categories"); migrationBuilder.DropTable( name: "Employees"); migrationBuilder.DropTable( name: "Positions"); } } }
39.885714
122
0.477937
[ "MIT" ]
alexdimitrov2000/Fast-Food-Exam
FastFood/FastFood.Data/Migrations/20180804195031_Initial.cs
6,982
C#
// Copyright 2017 the original author or authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. using Steeltoe.CircuitBreaker.Hystrix.Util; using System; using System.Collections.Concurrent; namespace Steeltoe.CircuitBreaker.Hystrix.Strategy.Options { public class HystrixOptionsFactory { public static void Reset() { commandProperties.Clear(); threadPoolProperties.Clear(); collapserProperties.Clear(); } private static ConcurrentDictionary<string, IHystrixCommandOptions> commandProperties = new ConcurrentDictionary<string, IHystrixCommandOptions>(); public static IHystrixCommandOptions GetCommandOptions(IHystrixCommandKey key, IHystrixCommandOptions builder) { HystrixOptionsStrategy hystrixPropertiesStrategy = HystrixPlugins.OptionsStrategy; string cacheKey = hystrixPropertiesStrategy.GetCommandOptionsCacheKey(key, builder); if (cacheKey != null) { return commandProperties.GetOrAddEx(cacheKey, (k) => hystrixPropertiesStrategy.GetCommandOptions(key, builder)); } else { // no cacheKey so we generate it with caching return hystrixPropertiesStrategy.GetCommandOptions(key, builder); } } private static ConcurrentDictionary<string, IHystrixThreadPoolOptions> threadPoolProperties = new ConcurrentDictionary<string, IHystrixThreadPoolOptions>(); public static IHystrixThreadPoolOptions GetThreadPoolOptions(IHystrixThreadPoolKey key, IHystrixThreadPoolOptions builder) { HystrixOptionsStrategy hystrixPropertiesStrategy = HystrixPlugins.OptionsStrategy; string cacheKey = hystrixPropertiesStrategy.GetThreadPoolOptionsCacheKey(key, builder); if (cacheKey != null) { return threadPoolProperties.GetOrAddEx(cacheKey, (k) => hystrixPropertiesStrategy.GetThreadPoolOptions(key, builder)); } else { // no cacheKey so we generate it with caching return hystrixPropertiesStrategy.GetThreadPoolOptions(key, builder); } } private static ConcurrentDictionary<string, IHystrixCollapserOptions> collapserProperties = new ConcurrentDictionary<string, IHystrixCollapserOptions>(); public static IHystrixCollapserOptions GetCollapserOptions(IHystrixCollapserKey key, IHystrixCollapserOptions builder) { HystrixOptionsStrategy hystrixPropertiesStrategy = HystrixPlugins.OptionsStrategy; string cacheKey = hystrixPropertiesStrategy.GetCollapserOptionsCacheKey(key, builder); if (cacheKey != null) { return collapserProperties.GetOrAddEx(cacheKey, (k) => hystrixPropertiesStrategy.GetCollapserOptions(key, builder)); } else { // no cacheKey so we generate it with caching return hystrixPropertiesStrategy.GetCollapserOptions(key, builder); } } } }
44.585366
164
0.690372
[ "ECL-2.0", "Apache-2.0" ]
SteeltoeOSS/CircuitBreaker
src/Steeltoe.CircuitBreaker.HystrixBase/Strategy/Options/HystrixOptionsFactory.cs
3,658
C#
// Copyright (c) Xenko contributors (https://xenko.com) and Silicon Studio Corp. (https://www.siliconstudio.co.jp) // Distributed under the MIT license. See the LICENSE.md file in the project root for more information. using System; using System.Collections; using System.Collections.Generic; using System.Linq; using Xenko.Core.Annotations; using Xenko.Core.Reflection; namespace Xenko.Core.Assets { /// <summary> /// A visitor that will generate a <see cref="CollectionItemIdentifiers"/> collection for each collection or dictionary of the visited object, /// and attach it to the related collection. /// </summary> public class CollectionIdGenerator : DataVisitorBase { private int inNonIdentifiableType; private HashSet<object> nonIdentifiableCollection; protected override bool CanVisit(object obj) { return !AssetRegistry.IsContentType(obj?.GetType()) && base.CanVisit(obj); } public override void VisitObject(object obj, ObjectDescriptor descriptor, bool visitMembers) { var localInNonIdentifiableType = false; try { if (descriptor.Attributes.OfType<NonIdentifiableCollectionItemsAttribute>().Any()) { localInNonIdentifiableType = true; inNonIdentifiableType++; } base.VisitObject(obj, descriptor, visitMembers); } finally { if (localInNonIdentifiableType) inNonIdentifiableType--; } } public override void VisitObjectMember(object container, ObjectDescriptor containerDescriptor, IMemberDescriptor member, object value) { if (member.GetCustomAttributes<NonIdentifiableCollectionItemsAttribute>(true).Any()) { // Value types (collection that are struct) will automatically be considered as non-identifiable. if (value?.GetType().IsValueType == false) { nonIdentifiableCollection = nonIdentifiableCollection ?? new HashSet<object>(); nonIdentifiableCollection.Add(value); } } base.VisitObjectMember(container, containerDescriptor, member, value); } public override void VisitArray(Array array, ArrayDescriptor descriptor) { if (ShouldGenerateItemIdCollection(array)) { var itemIds = CollectionItemIdHelper.GetCollectionItemIds(array); for (var i = 0; i < array.Length; ++i) { itemIds.Add(i, ItemId.New()); } } if (!IsArrayOfPrimitiveType(descriptor)) { base.VisitArray(array, descriptor); } } public override void VisitCollection(IEnumerable collection, CollectionDescriptor descriptor) { if (ShouldGenerateItemIdCollection(collection)) { var itemIds = CollectionItemIdHelper.GetCollectionItemIds(collection); var count = descriptor.GetCollectionCount(collection); for (var i = 0; i < count; ++i) { itemIds.Add(i, ItemId.New()); } } if (!descriptor.ElementType.IsValueType) { base.VisitCollection(collection, descriptor); } } public override void VisitDictionary(object dictionary, DictionaryDescriptor descriptor) { if (ShouldGenerateItemIdCollection(dictionary)) { var itemIds = CollectionItemIdHelper.GetCollectionItemIds(dictionary); foreach (var element in descriptor.GetEnumerator(dictionary)) { itemIds.Add(element.Key, ItemId.New()); } } } public override void VisitSet(IEnumerable set, SetDescriptor descriptor) { if (ShouldGenerateItemIdCollection(set)) { IEnumerator enumerator = (set as IEnumerable).GetEnumerator(); var itemIds = CollectionItemIdHelper.GetCollectionItemIds(set); while (enumerator.MoveNext()) { itemIds.Add(enumerator.Current, ItemId.New()); } } base.VisitSet(set, descriptor); } private bool ShouldGenerateItemIdCollection(object collection) { // Do not generate for value types (collections that are struct) or null if (collection?.GetType().IsValueType != false) return false; // Do not generate if within a type that doesn't use identifiable collections if (inNonIdentifiableType > 0) return false; // Do not generate if item id collection already exists if (CollectionItemIdHelper.HasCollectionItemIds(collection)) return false; // Do not generate if the collection has been flagged to not be identifiable if (nonIdentifiableCollection?.Contains(collection) == true) return false; return true; } } }
37.887324
146
0.583643
[ "MIT" ]
phr00t/xenko
sources/assets/Xenko.Core.Assets/CollectionIdGenerator.cs
5,380
C#
using System.Collections.Concurrent; namespace FastCSV.Converters.Collections { internal class ConcurrentStackOfTConverter<T> : IEnumerableOfTConverter<ConcurrentStack<T>, T> { public override void AddItem(ref ConcurrentStack<T> collection, int index, T item) { collection.Push(item); } public override ConcurrentStack<T> CreateCollection(int length) { return new ConcurrentStack<T>(); } } }
26.611111
98
0.65762
[ "MIT" ]
Neo-Ciber94/FastCSV
FastCSV/Converters/Collections/ConcurrentStackOfTConverter.cs
481
C#
// *** WARNING: this file was generated by crd2pulumi. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** using System; using System.Collections.Generic; using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; namespace Pulumi.Kubernetes.Types.Outputs.Ibmcloud.V1Alpha1 { [OutputType] public sealed class BindingSpecParameters { /// <summary> /// A parameter may have attributes (e.g. message hub topic might have partitions) /// </summary> public readonly ImmutableDictionary<string, ImmutableDictionary<string, object>> Attributes; /// <summary> /// Name representing the key. /// </summary> public readonly string Name; /// <summary> /// Defaults to null. /// </summary> public readonly object Value; /// <summary> /// Source for the value. Cannot be used if value is not empty. /// </summary> public readonly Pulumi.Kubernetes.Types.Outputs.Ibmcloud.V1Alpha1.BindingSpecParametersValueFrom ValueFrom; [OutputConstructor] private BindingSpecParameters( ImmutableDictionary<string, ImmutableDictionary<string, object>> attributes, string name, object value, Pulumi.Kubernetes.Types.Outputs.Ibmcloud.V1Alpha1.BindingSpecParametersValueFrom valueFrom) { Attributes = attributes; Name = name; Value = value; ValueFrom = valueFrom; } } }
31.76
115
0.637909
[ "Apache-2.0" ]
pulumi/pulumi-kubernetes-crds
operators/ibmcloud-operator/dotnet/Kubernetes/Crds/Operators/IbmcloudOperator/Ibmcloud/V1Alpha1/Outputs/BindingSpecParameters.cs
1,588
C#
namespace Xilium.CefGlue { using System; using System.Collections.Generic; using System.Diagnostics; using System.Runtime.InteropServices; using Xilium.CefGlue.Interop; /// <summary> /// Class used to read data from a stream. The methods of this class may be /// called on any thread. /// </summary> public sealed unsafe partial class CefStreamReader { /// <summary> /// Create a new CefStreamReader object from a file. /// </summary> public static cef_stream_reader_t* CreateForFile(cef_string_t* fileName) { throw new NotImplementedException(); // TODO: CefStreamReader.CreateForFile } /// <summary> /// Create a new CefStreamReader object from data. /// </summary> public static cef_stream_reader_t* CreateForData(void* data, UIntPtr size) { throw new NotImplementedException(); // TODO: CefStreamReader.CreateForData } /// <summary> /// Create a new CefStreamReader object from a custom handler. /// </summary> public static cef_stream_reader_t* CreateForHandler(cef_read_handler_t* handler) { throw new NotImplementedException(); // TODO: CefStreamReader.CreateForHandler } /// <summary> /// Read raw binary data. /// </summary> public UIntPtr Read(void* ptr, UIntPtr size, UIntPtr n) { throw new NotImplementedException(); // TODO: CefStreamReader.Read } /// <summary> /// Seek to the specified offset position. |whence| may be any one of /// SEEK_CUR, SEEK_END or SEEK_SET. Returns zero on success and non-zero on /// failure. /// </summary> public int Seek(long offset, int whence) { throw new NotImplementedException(); // TODO: CefStreamReader.Seek } /// <summary> /// Return the current offset position. /// </summary> public long Tell() { throw new NotImplementedException(); // TODO: CefStreamReader.Tell } /// <summary> /// Return non-zero if at end of file. /// </summary> public int Eof() { throw new NotImplementedException(); // TODO: CefStreamReader.Eof } /// <summary> /// Returns true if this reader performs work like accessing the file system /// which may block. Used as a hint for determining the thread to access the /// reader from. /// </summary> public int MayBlock() { throw new NotImplementedException(); // TODO: CefStreamReader.MayBlock } } }
33.094118
90
0.573765
[ "Apache-2.0" ]
mcleo-d/SFE-Minuet-DesktopClient
minuet/CefGlue.Interop.Gen/Classes.Proxies.tmpl/CefStreamReader.tmpl.g.cs
2,813
C#
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Collections.Immutable; using System.Diagnostics; using Microsoft.CodeAnalysis.CSharp.Symbols; namespace Microsoft.CodeAnalysis.CSharp { /// <summary> /// This pass detects and reports diagnostics that do not affect lambda convertibility. /// This part of the partial class focuses on expression and operator warnings. /// </summary> internal sealed partial class DiagnosticsPass : BoundTreeWalkerWithStackGuard { private void CheckArguments(ImmutableArray<RefKind> argumentRefKindsOpt, ImmutableArray<BoundExpression> arguments, Symbol method) { if (!argumentRefKindsOpt.IsDefault) { Debug.Assert(arguments.Length == argumentRefKindsOpt.Length); for (int i = 0; i < arguments.Length; i++) { if (argumentRefKindsOpt[i] != RefKind.None && arguments[i].Kind == BoundKind.FieldAccess) { CheckFieldAddress((BoundFieldAccess)arguments[i], method); } } } } /// <remarks> /// This is for when we are taking the address of a field. /// Distinguish from <see cref="CheckFieldAsReceiver"/>. /// </remarks> private void CheckFieldAddress(BoundFieldAccess fieldAccess, Symbol consumerOpt) { FieldSymbol fieldSymbol = fieldAccess.FieldSymbol; // We can safely suppress this warning when calling an Interlocked API if (fieldSymbol.IsVolatile && ((object)consumerOpt == null || !IsInterlockedAPI(consumerOpt))) { Error(ErrorCode.WRN_VolatileByRef, fieldAccess, fieldSymbol); } if (IsNonAgileFieldAccess(fieldAccess, _compilation)) { Error(ErrorCode.WRN_ByRefNonAgileField, fieldAccess, fieldSymbol); } } /// <remarks> /// This is for when we are dotting into a field. /// Distinguish from <see cref="CheckFieldAddress"/>. /// /// NOTE: dev11 also calls this on string initializers in fixed statements, /// but never accomplishes anything since string is a reference type. This /// is probably a bug, but fixing it would be a breaking change. /// </remarks> private void CheckFieldAsReceiver(BoundFieldAccess fieldAccess) { // From ExpressionBinder.cpp: // Taking the address of a field is suspect if the type is marshalbyref. // REVIEW ShonK: Is this really the best way to handle this? It'd be so much more // bullet proof for ilgen to error when it spits out the ldflda.... FieldSymbol fieldSymbol = fieldAccess.FieldSymbol; if (IsNonAgileFieldAccess(fieldAccess, _compilation) && !fieldSymbol.Type.IsReferenceType) { Error(ErrorCode.WRN_CallOnNonAgileField, fieldAccess, fieldSymbol); } } private void CheckReceiverIfField(BoundExpression receiverOpt) { if (receiverOpt != null && receiverOpt.Kind == BoundKind.FieldAccess) { CheckFieldAsReceiver((BoundFieldAccess)receiverOpt); } } /// <remarks> /// Based on OutputContext::IsNonAgileField. /// </remarks> internal static bool IsNonAgileFieldAccess(BoundFieldAccess fieldAccess, CSharpCompilation compilation) { // Warn if taking the address of a non-static field with a receiver other than this (possibly cast) // and a type that descends from System.MarshalByRefObject. if (IsInstanceFieldAccessWithNonThisReceiver(fieldAccess)) { // NOTE: We're only trying to produce a warning, so there's no point in producing an // error if the well-known type we need for the check is missing. NamedTypeSymbol marshalByRefType = compilation.GetWellKnownType(WellKnownType.System_MarshalByRefObject); TypeSymbol baseType = fieldAccess.FieldSymbol.ContainingType; while ((object)baseType != null) { if (baseType == marshalByRefType) { return true; } // NOTE: We're only trying to produce a warning, so there's no point in producing a // use site diagnostic if we can't walk up the base type hierarchy. baseType = baseType.BaseTypeNoUseSiteDiagnostics; } } return false; } private static bool IsInstanceFieldAccessWithNonThisReceiver(BoundFieldAccess fieldAccess) { BoundExpression receiver = fieldAccess.ReceiverOpt; if (receiver == null || fieldAccess.FieldSymbol.IsStatic) { return false; } while (receiver.Kind == BoundKind.Conversion) { BoundConversion conversion = (BoundConversion)receiver; if (conversion.ExplicitCastInCode) break; receiver = conversion.Operand; } return receiver.Kind != BoundKind.ThisReference && receiver.Kind != BoundKind.BaseReference; } private bool IsInterlockedAPI(Symbol method) { var interlocked = _compilation.GetWellKnownType(WellKnownType.System_Threading_Interlocked); if ((object)interlocked != null && interlocked == method.ContainingType) return true; return false; } private static BoundExpression StripImplicitCasts(BoundExpression expr) { BoundExpression current = expr; while (true) { // CONSIDER: Dev11 doesn't strip conversions to float or double. BoundConversion conversion = current as BoundConversion; if (conversion == null || !conversion.ConversionKind.IsImplicitConversion()) { return current; } current = conversion.Operand; } } private static bool IsSameLocalOrField(BoundExpression expr1, BoundExpression expr2) { if (expr1 == null && expr2 == null) { return true; } if (expr1 == null || expr2 == null) { return false; } if (expr1.HasAnyErrors || expr2.HasAnyErrors) { return false; } expr1 = StripImplicitCasts(expr1); expr2 = StripImplicitCasts(expr2); if (expr1.Kind != expr2.Kind) { return false; } switch (expr1.Kind) { case BoundKind.Local: var local1 = expr1 as BoundLocal; var local2 = expr2 as BoundLocal; return local1.LocalSymbol == local2.LocalSymbol; case BoundKind.FieldAccess: var field1 = expr1 as BoundFieldAccess; var field2 = expr2 as BoundFieldAccess; return field1.FieldSymbol == field2.FieldSymbol && (field1.FieldSymbol.IsStatic || IsSameLocalOrField(field1.ReceiverOpt, field2.ReceiverOpt)); case BoundKind.EventAccess: var event1 = expr1 as BoundEventAccess; var event2 = expr2 as BoundEventAccess; return event1.EventSymbol == event2.EventSymbol && (event1.EventSymbol.IsStatic || IsSameLocalOrField(event1.ReceiverOpt, event2.ReceiverOpt)); case BoundKind.Parameter: var param1 = expr1 as BoundParameter; var param2 = expr2 as BoundParameter; return param1.ParameterSymbol == param2.ParameterSymbol; case BoundKind.RangeVariable: var rangeVar1 = expr1 as BoundRangeVariable; var rangeVar2 = expr2 as BoundRangeVariable; return rangeVar1.RangeVariableSymbol == rangeVar2.RangeVariableSymbol; case BoundKind.ThisReference: case BoundKind.PreviousSubmissionReference: case BoundKind.HostObjectMemberReference: Debug.Assert(expr1.Type == expr2.Type); return true; default: return false; } } private static bool IsComCallWithRefOmitted(MethodSymbol method, ImmutableArray<BoundExpression> arguments, ImmutableArray<RefKind> argumentRefKindsOpt) { if (method.ParameterCount != arguments.Length || (object)method.ContainingType == null || !method.ContainingType.IsComImport) return false; for (int i = 0; i < arguments.Length; i++) { if (method.Parameters[i].RefKind != RefKind.None && (argumentRefKindsOpt.IsDefault || argumentRefKindsOpt[i] == RefKind.None)) return true; } return false; } private void CheckBinaryOperator(BoundBinaryOperator node) { if ((object)node.MethodOpt == null) { CheckUnsafeType(node.Left); CheckUnsafeType(node.Right); } CheckForBitwiseOrSignExtend(node, node.OperatorKind, node.Left, node.Right); CheckNullableNullBinOp(node); CheckLiftedBinOp(node); CheckRelationals(node); CheckDynamic(node); } private void CheckCompoundAssignmentOperator(BoundCompoundAssignmentOperator node) { BoundExpression left = node.Left; if (!node.Operator.Kind.IsDynamic() && !node.LeftConversion.IsIdentity && node.LeftConversion.Exists) { // Need to represent the implicit conversion as a node in order to be able to produce correct diagnostics. left = new BoundConversion(left.Syntax, left, node.LeftConversion, node.Operator.Kind.IsChecked(), explicitCastInCode: false, constantValueOpt: null, type: node.Operator.LeftType); } CheckForBitwiseOrSignExtend(node, node.Operator.Kind, left, node.Right); CheckLiftedCompoundAssignment(node); if (_inExpressionLambda) { Error(ErrorCode.ERR_ExpressionTreeContainsAssignment, node); } } private void CheckRelationals(BoundBinaryOperator node) { Debug.Assert(node != null); if (!node.OperatorKind.IsComparison()) { return; } // Don't bother to check vacuous comparisons where both sides are constant, eg, where someone // is doing something like "if (0xFFFFFFFFU == 0)" -- these are likely to be machine- // generated code. if (node.Left.ConstantValue != null && node.Right.ConstantValue == null && node.Right.Kind == BoundKind.Conversion) { CheckVacuousComparisons(node, node.Left.ConstantValue, node.Right); } if (node.Right.ConstantValue != null && node.Left.ConstantValue == null && node.Left.Kind == BoundKind.Conversion) { CheckVacuousComparisons(node, node.Right.ConstantValue, node.Left); } if (node.OperatorKind == BinaryOperatorKind.ObjectEqual || node.OperatorKind == BinaryOperatorKind.ObjectNotEqual) { TypeSymbol t; if (node.Left.Type.SpecialType == SpecialType.System_Object && !IsExplicitCast(node.Left) && !(node.Left.ConstantValue != null && node.Left.ConstantValue.IsNull) && ConvertedHasEqual(node.OperatorKind, node.Right, out t)) { // Possible unintended reference comparison; to get a value comparison, cast the left hand side to type '{0}' _diagnostics.Add(ErrorCode.WRN_BadRefCompareLeft, node.Syntax.Location, t); } else if (node.Right.Type.SpecialType == SpecialType.System_Object && !IsExplicitCast(node.Right) && !(node.Right.ConstantValue != null && node.Right.ConstantValue.IsNull) && ConvertedHasEqual(node.OperatorKind, node.Left, out t)) { // Possible unintended reference comparison; to get a value comparison, cast the right hand side to type '{0}' _diagnostics.Add(ErrorCode.WRN_BadRefCompareRight, node.Syntax.Location, t); } } CheckSelfComparisons(node); } private static bool IsExplicitCast(BoundExpression node) { return node.Kind == BoundKind.Conversion && ((BoundConversion)node).ExplicitCastInCode; } private static bool ConvertedHasEqual(BinaryOperatorKind oldOperatorKind, BoundNode node, out TypeSymbol type) { type = null; if (node.Kind != BoundKind.Conversion) return false; var conv = (BoundConversion)node; if (conv.ExplicitCastInCode) return false; NamedTypeSymbol nt = conv.Operand.Type as NamedTypeSymbol; if ((object)nt == null || !nt.IsReferenceType) return false; string opName = (oldOperatorKind == BinaryOperatorKind.ObjectEqual) ? WellKnownMemberNames.EqualityOperatorName : WellKnownMemberNames.InequalityOperatorName; for (var t = nt; (object)t != null; t = t.BaseTypeNoUseSiteDiagnostics) { foreach (var sym in t.GetMembers(opName)) { MethodSymbol op = sym as MethodSymbol; if ((object)op == null || op.MethodKind != MethodKind.UserDefinedOperator) continue; var parameters = op.GetParameters(); if (parameters.Length == 2 && parameters[0].Type == t && parameters[1].Type == t) { type = t; return true; } } } return false; } private void CheckSelfComparisons(BoundBinaryOperator node) { Debug.Assert(node != null); Debug.Assert(node.OperatorKind.IsComparison()); if (!node.HasAnyErrors && IsSameLocalOrField(node.Left, node.Right)) { Error(ErrorCode.WRN_ComparisonToSelf, node); } } private void CheckVacuousComparisons(BoundBinaryOperator tree, ConstantValue constantValue, BoundNode operand) { Debug.Assert(tree != null); Debug.Assert(constantValue != null); Debug.Assert(operand != null); // We wish to detect comparisons between integers and constants which are likely to be wrong // because we know at compile time whether they will be true or false. For example: // // const short s = 1000; // byte b = whatever; // if (b < s) // // We know that this will always be true because when b and s are both converted to int for // the comparison, the left side will always be less than the right side. // // We only give the warning if there is no explicit conversion involved on the operand. // For example, if we had: // // const uint s = 1000; // sbyte b = whatever; // if ((byte)b < s) // // Then we do not give a warning. // // Note that the native compiler has what looks to be some dead code. It checks to see // if the conversion on the operand is from an enum type. But this is unnecessary if // we are rejecting cases with explicit conversions. The only possible cases are: // // enum == enumConstant -- enum types must be the same, so it must be in range. // enum == integralConstant -- not legal unless the constant is zero, which is in range. // enum == (ENUM)anyConstant -- if the constant is out of range then this is not legal in the first place // unless we're in an unchecked context, in which case, the user probably does // not want the warning. // integral == enumConstant -- never legal in the first place // // Since it seems pointless to try to check enums, we simply look for vacuous comparisons of // integral types here. for (BoundConversion conversion = operand as BoundConversion; conversion != null; conversion = conversion.Operand as BoundConversion) { if (conversion.ConversionKind != ConversionKind.ImplicitNumeric && conversion.ConversionKind != ConversionKind.ImplicitConstant) { return; } // As in dev11, we don't dig through explicit casts (see ExpressionBinder::WarnAboutBadRelationals). if (conversion.ExplicitCastInCode) { return; } if (!conversion.Operand.Type.SpecialType.IsIntegralType() || !conversion.Type.SpecialType.IsIntegralType()) { return; } if (!Binder.CheckConstantBounds(conversion.Operand.Type.SpecialType, constantValue)) { Error(ErrorCode.WRN_VacuousIntegralComp, tree, conversion.Operand.Type); return; } } } private void CheckForBitwiseOrSignExtend(BoundExpression node, BinaryOperatorKind operatorKind, BoundExpression leftOperand, BoundExpression rightOperand) { // We wish to give a warning for situations where an unexpected sign extension wipes // out some bits. For example: // // int x = 0x0ABC0000; // short y = -2; // 0xFFFE // int z = x | y; // // The user might naively expect the result to be 0x0ABCFFFE. But the short is sign-extended // when it is converted to int before the bitwise or, so this is in fact the same as: // // int x = 0x0ABC0000; // short y = -2; // 0xFFFE // int ytemp = y; // 0xFFFFFFFE // int z = x | ytemp; // // Which gives 0xFFFFFFFE, not 0x0ABCFFFE. // // However, we wish to suppress the warning if: // // * The sign extension is "expected" -- for instance, because there was an explicit cast // from short to int: "int z = x | (int)y;" should not produce the warning. // Note that "uint z = (uint)x | (uint)y;" should still produce the warning because // the user might not realize that converting y to uint does a sign extension. // // * There is the same amount of sign extension on both sides. For example, when // doing "short | sbyte", both sides are sign extended. The left creates two FF bytes // and the right creates three, so we are potentially wiping out information from the // left side. But "short | short" adds two FF bytes on both sides, so no information is lost. // // The native compiler also suppresses this warning in a bizarre and inconsistent way. If // the side whose bits are going to be wiped out by sign extension is a *constant*, then the // warning is suppressed *if the constant, when converted to a signed long, fits into the // range of the type that is being sign-extended.* // // Consider the effects of this rule: // // (uint)0xFFFF0000 | y -- gives the warning because 0xFFFF0000 as a long is not in the range of a short, // *even though the result will not be affected by the sign extension*. // (ulong)0xFFFFFFFFFFFFFFFF | y -- suppresses the warning, because 0xFFFFFFFFFFFFFFFF as a signed long fits into a short. // (int)0x0000ABCD | y -- suppresses the warning, even though the 0000 is going to be wiped out by the sign extension. // // It seems clear that the intention of the heuristic is to *suppress the warning when the bits being hammered // on are either all zero, or all one.* Therefore that is the heuristic we will *actually* implement here. // switch (operatorKind) { case BinaryOperatorKind.LiftedUIntOr: case BinaryOperatorKind.LiftedIntOr: case BinaryOperatorKind.LiftedULongOr: case BinaryOperatorKind.LiftedLongOr: case BinaryOperatorKind.UIntOr: case BinaryOperatorKind.IntOr: case BinaryOperatorKind.ULongOr: case BinaryOperatorKind.LongOr: break; default: return; } // The native compiler skips this warning if both sides of the operator are constants. // // CONSIDER: Is that sensible? It seems reasonable that if we would warn on int | short // when they are non-constants, or when one is a constant, that we would similarly warn // when both are constants. if (node.ConstantValue != null) { return; } // Start by determining *which bits on each side are going to be unexpectedly turned on*. ulong left = FindSurprisingSignExtensionBits(leftOperand); ulong right = FindSurprisingSignExtensionBits(rightOperand); // If they are all the same then there's no warning to give. if (left == right) { return; } // Suppress the warning if one side is a constant, and either all the unexpected // bits are already off, or all the unexpected bits are already on. ConstantValue constVal = GetConstantValueForBitwiseOrCheck(leftOperand); if (constVal != null) { ulong val = constVal.UInt64Value; if ((val & right) == right || (~val & right) == right) { return; } } constVal = GetConstantValueForBitwiseOrCheck(rightOperand); if (constVal != null) { ulong val = constVal.UInt64Value; if ((val & left) == left || (~val & left) == left) { return; } } // CS0675: Bitwise-or operator used on a sign-extended operand; consider casting to a smaller unsigned type first Error(ErrorCode.WRN_BitwiseOrSignExtend, node); } private static ConstantValue GetConstantValueForBitwiseOrCheck(BoundExpression operand) { // We might have a nullable conversion on top of an integer constant. But only dig out // one level. if (operand.Kind == BoundKind.Conversion) { BoundConversion conv = (BoundConversion)operand; if (conv.ConversionKind == ConversionKind.ImplicitNullable) { operand = conv.Operand; } } ConstantValue constVal = operand.ConstantValue; if (constVal == null || !constVal.IsIntegral) { return null; } return constVal; } // A "surprising" sign extension is: // // * a conversion with no cast in source code that goes from a smaller // signed type to a larger signed or unsigned type. // // * an conversion (with or without a cast) from a smaller // signed type to a larger unsigned type. private static ulong FindSurprisingSignExtensionBits(BoundExpression expr) { if (expr.Kind != BoundKind.Conversion) { return 0; } BoundConversion conv = (BoundConversion)expr; TypeSymbol from = conv.Operand.Type; TypeSymbol to = conv.Type; if ((object)from == null || (object)to == null) { return 0; } if (from.IsNullableType()) { from = from.GetNullableUnderlyingType(); } if (to.IsNullableType()) { to = to.GetNullableUnderlyingType(); } SpecialType fromSpecialType = from.SpecialType; SpecialType toSpecialType = to.SpecialType; if (!fromSpecialType.IsIntegralType() || !toSpecialType.IsIntegralType()) { return 0; } int fromSize = fromSpecialType.SizeInBytes(); int toSize = toSpecialType.SizeInBytes(); if (fromSize == 0 || toSize == 0) { return 0; } // The operand might itself be a conversion, and might be contributing // surprising bits. We might have more, fewer or the same surprising bits // as the operand. ulong recursive = FindSurprisingSignExtensionBits(conv.Operand); if (fromSize == toSize) { // No change. return recursive; } if (toSize < fromSize) { // We are casting from a larger type to a smaller type, and are therefore // losing surprising bits. switch (toSize) { case 1: return unchecked((ulong)(byte)recursive); case 2: return unchecked((ulong)(ushort)recursive); case 4: return unchecked((ulong)(uint)recursive); } Debug.Assert(false, "How did we get here?"); return recursive; } // We are converting from a smaller type to a larger type, and therefore might // be adding surprising bits. First of all, the smaller type has got to be signed // for there to be sign extension. bool fromSigned = fromSpecialType.IsSignedIntegralType(); if (!fromSigned) { return recursive; } // OK, we know that the "from" type is a signed integer that is smaller than the // "to" type, so we are going to have sign extension. Is it surprising? The only // time that sign extension is *not* surprising is when we have a cast operator // to a *signed* type. That is, (int)myShort is not a surprising sign extension. if (conv.ExplicitCastInCode && toSpecialType.IsSignedIntegralType()) { return recursive; } // Note that we *could* be somewhat more clever here. Consider the following edge case: // // (ulong)(int)(uint)(ushort)mySbyte // // We could reason that the sbyte-to-ushort conversion is going to add one byte of // unexpected sign extension. The conversion from ushort to uint adds no more bytes. // The conversion from uint to int adds no more bytes. Does the conversion from int // to ulong add any more bytes of unexpected sign extension? Well, no, because we // know that the previous conversion from ushort to uint will ensure that the top bit // of the uint is off! // // But we are not going to try to be that clever. In the extremely unlikely event that // someone does this, we will record that the unexpectedly turned-on bits are // 0xFFFFFFFF0000FF00, even though we could in theory deduce that only 0x000000000000FF00 // are the unexpected bits. ulong result = recursive; for (int i = fromSize; i < toSize; ++i) { result |= (0xFFUL) << (i * 8); } return result; } private void CheckLiftedCompoundAssignment(BoundCompoundAssignmentOperator node) { Debug.Assert(node != null); if (!node.Operator.Kind.IsLifted()) { return; } // CS0458: The result of the expression is always 'null' of type '{0}' if (node.Right.NullableNeverHasValue()) { Error(ErrorCode.WRN_AlwaysNull, node, node.Type); } } private void CheckLiftedUnaryOp(BoundUnaryOperator node) { Debug.Assert(node != null); if (!node.OperatorKind.IsLifted()) { return; } // CS0458: The result of the expression is always 'null' of type '{0}' if (node.Operand.NullableNeverHasValue()) { Error(ErrorCode.WRN_AlwaysNull, node, node.Type); } } private void CheckNullableNullBinOp(BoundBinaryOperator node) { if ((node.OperatorKind & BinaryOperatorKind.NullableNull) == 0) { return; } switch (node.OperatorKind.Operator()) { case BinaryOperatorKind.Equal: case BinaryOperatorKind.NotEqual: // CS0472: The result of the expression is always '{0}' since a value of type '{1}' is never equal to 'null' of type '{2}' // // Produce the warning if one side is always null and the other is never null. // That is, we have something like "if (myInt == null)" string always = node.OperatorKind.Operator() == BinaryOperatorKind.NotEqual ? "true" : "false"; // we use a separate warning code for cases newly detected in later versions of the compiler if (node.Right.IsLiteralNull() && node.Left.NullableAlwaysHasValue()) { Error(ErrorCode.WRN_NubExprIsConstBool, node, always, node.Left.Type.GetNullableUnderlyingType(), node.Left.Type); } else if (node.Left.IsLiteralNull() && node.Right.NullableAlwaysHasValue()) { Error(ErrorCode.WRN_NubExprIsConstBool, node, always, node.Right.Type.GetNullableUnderlyingType(), node.Right.Type); } break; } } private void CheckLiftedBinOp(BoundBinaryOperator node) { Debug.Assert(node != null); if (!node.OperatorKind.IsLifted()) { return; } switch (node.OperatorKind.Operator()) { case BinaryOperatorKind.LessThan: case BinaryOperatorKind.LessThanOrEqual: case BinaryOperatorKind.GreaterThan: case BinaryOperatorKind.GreaterThanOrEqual: // CS0464: Comparing with null of type '{0}' always produces 'false' // // Produce the warning if one (or both) sides are always null. if (node.Right.NullableNeverHasValue()) { Error(ErrorCode.WRN_CmpAlwaysFalse, node, GetTypeForLiftedComparisonWarning(node.Right)); } else if (node.Left.NullableNeverHasValue()) { Error(ErrorCode.WRN_CmpAlwaysFalse, node, GetTypeForLiftedComparisonWarning(node.Left)); } break; case BinaryOperatorKind.Equal: case BinaryOperatorKind.NotEqual: // CS0472: The result of the expression is always '{0}' since a value of type '{1}' is never equal to 'null' of type '{2}' // // Produce the warning if one side is always null and the other is never null. // That is, we have something like "if (myInt == null)" string always = node.OperatorKind.Operator() == BinaryOperatorKind.NotEqual ? "true" : "false"; if (_compilation.FeatureStrictEnabled || !node.OperatorKind.IsUserDefined()) { if (node.Right.NullableNeverHasValue() && node.Left.NullableAlwaysHasValue()) { Error(node.OperatorKind.IsUserDefined() ? ErrorCode.WRN_NubExprIsConstBool2 : ErrorCode.WRN_NubExprIsConstBool, node, always, node.Left.Type.GetNullableUnderlyingType(), GetTypeForLiftedComparisonWarning(node.Right)); } else if (node.Left.NullableNeverHasValue() && node.Right.NullableAlwaysHasValue()) { Error(node.OperatorKind.IsUserDefined() ? ErrorCode.WRN_NubExprIsConstBool2 : ErrorCode.WRN_NubExprIsConstBool, node, always, node.Right.Type.GetNullableUnderlyingType(), GetTypeForLiftedComparisonWarning(node.Left)); } } break; case BinaryOperatorKind.Or: case BinaryOperatorKind.And: // CS0458: The result of the expression is always 'null' of type '{0}' if ((node.Left.NullableNeverHasValue() && node.Right.IsNullableNonBoolean()) || (node.Left.IsNullableNonBoolean() && node.Right.NullableNeverHasValue())) Error(ErrorCode.WRN_AlwaysNull, node, node.Type); break; default: // CS0458: The result of the expression is always 'null' of type '{0}' if (node.Right.NullableNeverHasValue() || node.Left.NullableNeverHasValue()) { Error(ErrorCode.WRN_AlwaysNull, node, node.Type); } break; } } private void CheckLiftedUserDefinedConditionalLogicalOperator(BoundUserDefinedConditionalLogicalOperator node) { // CS0458: The result of the expression is always 'null' of type '{0}' if (node.Right.NullableNeverHasValue() || node.Left.NullableNeverHasValue()) { Error(ErrorCode.WRN_AlwaysNull, node, node.Type); } } private static TypeSymbol GetTypeForLiftedComparisonWarning(BoundExpression node) { // If we have something like "10 < new sbyte?()" we bind that as // (int?)10 < (int?)(new sbyte?()) // but the warning we want to produce is that the null on the right hand // side is of type sbyte?, not int?. if ((object)node.Type == null || !node.Type.IsNullableType()) { return null; } TypeSymbol type = null; if (node.Kind == BoundKind.Conversion) { var conv = (BoundConversion)node; if (conv.ConversionKind == ConversionKind.ExplicitNullable || conv.ConversionKind == ConversionKind.ImplicitNullable) { type = GetTypeForLiftedComparisonWarning(conv.Operand); } } return type ?? node.Type; } private bool CheckForAssignmentToSelf(BoundAssignmentOperator node) { if (!node.HasAnyErrors && IsSameLocalOrField(node.Left, node.Right)) { Error(ErrorCode.WRN_AssignmentToSelf, node); return true; } return false; } public override BoundNode VisitFieldAccess(BoundFieldAccess node) { CheckReceiverIfField(node.ReceiverOpt); return base.VisitFieldAccess(node); } public override BoundNode VisitPropertyAccess(BoundPropertyAccess node) { CheckReceiverIfField(node.ReceiverOpt); return base.VisitPropertyAccess(node); } public override BoundNode VisitPropertyGroup(BoundPropertyGroup node) { CheckReceiverIfField(node.ReceiverOpt); return base.VisitPropertyGroup(node); } } }
43.433372
245
0.558333
[ "Apache-2.0" ]
0x53A/roslyn
src/Compilers/CSharp/Portable/Lowering/DiagnosticsPass_Warnings.cs
37,485
C#
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** using System; using System.Collections.Generic; using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; namespace Pulumi.Datadog.Inputs { public sealed class DashboardWidgetChangeDefinitionRequestFormulaLimitGetArgs : Pulumi.ResourceArgs { [Input("count")] public Input<int>? Count { get; set; } [Input("order")] public Input<string>? Order { get; set; } public DashboardWidgetChangeDefinitionRequestFormulaLimitGetArgs() { } } }
27.384615
103
0.692416
[ "ECL-2.0", "Apache-2.0" ]
pulumi/pulumi-datadog
sdk/dotnet/Inputs/DashboardWidgetChangeDefinitionRequestFormulaLimitGetArgs.cs
712
C#
using System.Collections; namespace QFramework { public interface IResDatas { /// <summary> /// 获取依赖 /// </summary> /// <param name="url"></param> /// <returns></returns> string[] GetAllDependenciesByUrl(string url); void LoadFromFile(string outRes); void Reset(); IEnumerator LoadFromFileAsync(string outRes); // string GetAssetBundleName(string assetName, int assetBundleIndex, string ownerBundleName); AssetData GetAssetData(ResSearchKeys resSearchKeys); int AddAssetBundleName(string abName, string[] depends, out AssetDataGroup @group); // void AddAssetData(AssetData assetData); // void InitForEditor(); } }
32.130435
101
0.641407
[ "MIT" ]
JiYangJi/QFramework
Unity2019ILRuntime/Assets/QFramework/Framework/Plugins/Runtime/ResKit/AssetBundleSupport/ConfigFile/IResDatas.cs
747
C#
using UnityEngine; using System.Collections.Generic; #if UNITY_EDITOR #endif namespace Pathfinding { [AddComponentMenu("Pathfinding/Link2")] public class NodeLink2 : GraphModifier { protected static Dictionary<GraphNode,NodeLink2> reference = new Dictionary<GraphNode,NodeLink2>(); public static NodeLink2 GetNodeLink (GraphNode node) { NodeLink2 v; reference.TryGetValue (node, out v); return v; } /** End position of the link */ public Transform end; /** The connection will be this times harder/slower to traverse. * Note that values lower than one will not always make the pathfinder choose this path instead of another path even though this one should * lead to a lower total cost unless you also adjust the Heuristic Scale in A* Inspector -> Settings -> Pathfinding or disable the heuristic altogether. */ public float costFactor = 1.0f; /** Make a one-way connection */ public bool oneWay = false; /* Delete existing connection instead of adding one */ //public bool deleteConnection = false; //private bool createHiddenNodes = true; public Transform StartTransform { get { return transform; } } public Transform EndTransform { get { return end; } } PointNode startNode; PointNode endNode; MeshNode connectedNode1, connectedNode2; Vector3 clamped1, clamped2; bool postScanCalled = false; public GraphNode StartNode { get { return startNode; } } public GraphNode EndNode { get { return endNode; } } public override void OnPostScan () { if (AstarPath.active.isScanning) { InternalOnPostScan (); } else { AstarPath.active.AddWorkItem (new AstarPath.AstarWorkItem (delegate (bool force) { InternalOnPostScan (); return true; })); } } public void InternalOnPostScan () { if ( AstarPath.active.astarData.pointGraph == null ) { AstarPath.active.astarData.AddGraph ( new PointGraph () ); } if ( startNode != null) { NodeLink2 tmp; if (reference.TryGetValue (startNode, out tmp) && tmp == this) reference.Remove (startNode); } if ( endNode != null) { NodeLink2 tmp; if (reference.TryGetValue (endNode, out tmp) && tmp == this) reference.Remove (endNode); } //Get nearest nodes from the first point graph, assuming both start and end transforms are nodes startNode = AstarPath.active.astarData.pointGraph.AddNode ( (Int3)StartTransform.position );//AstarPath.active.astarData.pointGraph.GetNearest(StartTransform.position).node as PointNode; endNode = AstarPath.active.astarData.pointGraph.AddNode ( (Int3)EndTransform.position ); //AstarPath.active.astarData.pointGraph.GetNearest(EndTransform.position).node as PointNode; connectedNode1 = null; connectedNode2 = null; if (startNode == null || endNode == null) { startNode = null; endNode = null; return; } postScanCalled = true; reference[startNode] = this; reference[endNode] = this; Apply( true ); } public override void OnGraphsPostUpdate () { //if (connectedNode1 != null && connectedNode2 != null) { if (!AstarPath.active.isScanning) { if (connectedNode1 != null && connectedNode1.Destroyed) { connectedNode1 = null; } if (connectedNode2 != null && connectedNode2.Destroyed) { connectedNode2 = null; } if (!postScanCalled) { OnPostScan(); } else { //OnPostScan will also call this method /** \todo Can mess up pathfinding, wrap in delegate */ Apply( false ); } } } protected override void OnEnable () { base.OnEnable(); if (AstarPath.active != null && AstarPath.active.astarData != null && AstarPath.active.astarData.pointGraph != null) { OnGraphsPostUpdate (); } } protected override void OnDisable () { base.OnDisable(); postScanCalled = false; if ( startNode != null) { NodeLink2 tmp; if (reference.TryGetValue (startNode, out tmp) && tmp == this) reference.Remove (startNode); } if ( endNode != null) { NodeLink2 tmp; if (reference.TryGetValue (endNode, out tmp) && tmp == this) reference.Remove (endNode); } if (startNode != null && endNode != null) { startNode.RemoveConnection (endNode); endNode.RemoveConnection (startNode); if (connectedNode1 != null && connectedNode2 != null) { startNode.RemoveConnection (connectedNode1); connectedNode1.RemoveConnection (startNode); endNode.RemoveConnection (connectedNode2); connectedNode2.RemoveConnection (endNode); } } } void RemoveConnections (GraphNode node) { //TODO, might be better to replace connection node.ClearConnections (true); } [ContextMenu ("Recalculate neighbours")] void ContextApplyForce () { if (Application.isPlaying) { Apply ( true ); if ( AstarPath.active != null ) { AstarPath.active.FloodFill (); } } } public void Apply ( bool forceNewCheck ) { //TODO //This function assumes that connections from the n1,n2 nodes never need to be removed in the future (e.g because the nodes move or something) NNConstraint nn = NNConstraint.None; int graph = (int)startNode.GraphIndex; //Search all graphs but the one which start and end nodes are on nn.graphMask = ~(1 << graph); startNode.SetPosition ( (Int3)StartTransform.position ); endNode.SetPosition ( (Int3)EndTransform.position ); RemoveConnections(startNode); RemoveConnections(endNode); uint cost = (uint)Mathf.RoundToInt(((Int3)(StartTransform.position-EndTransform.position)).costMagnitude*costFactor); startNode.AddConnection (endNode, cost); endNode.AddConnection(startNode, cost); if (connectedNode1 == null || forceNewCheck) { NNInfo n1 = AstarPath.active.GetNearest(StartTransform.position, nn); connectedNode1 = n1.node as MeshNode; clamped1 = n1.clampedPosition; } if (connectedNode2 == null || forceNewCheck) { NNInfo n2 = AstarPath.active.GetNearest(EndTransform.position, nn); connectedNode2 = n2.node as MeshNode; clamped2 = n2.clampedPosition; } if (connectedNode2 == null || connectedNode1 == null) return; //Add connections between nodes, or replace old connections if existing connectedNode1.AddConnection(startNode, (uint)Mathf.RoundToInt (((Int3)(clamped1 - StartTransform.position)).costMagnitude*costFactor)); connectedNode2.AddConnection(endNode, (uint)Mathf.RoundToInt (((Int3)(clamped2 - EndTransform.position)).costMagnitude*costFactor)); startNode.AddConnection(connectedNode1, (uint)Mathf.RoundToInt (((Int3)(clamped1 - StartTransform.position)).costMagnitude*costFactor)); endNode.AddConnection(connectedNode2, (uint)Mathf.RoundToInt (((Int3)(clamped2 - EndTransform.position)).costMagnitude*costFactor)); } void DrawCircle (Vector3 o, float r, int detail, Color col) { Vector3 prev = new Vector3(Mathf.Cos(0)*r,0,Mathf.Sin(0)*r) + o; Gizmos.color = col; for (int i=0;i<=detail;i++) { float t = (i*Mathf.PI*2f)/detail; Vector3 c = new Vector3(Mathf.Cos(t)*r,0,Mathf.Sin(t)*r) + o; Gizmos.DrawLine(prev,c); prev = c; } } private readonly static Color GizmosColor = new Color(206.0f/255.0f,136.0f/255.0f,48.0f/255.0f,0.5f); private readonly static Color GizmosColorSelected = new Color(235.0f/255.0f,123.0f/255.0f,32.0f/255.0f,1.0f); void DrawGizmoBezier (Vector3 p1, Vector3 p2) { Vector3 dir = p2-p1; if (dir == Vector3.zero) return; Vector3 normal = Vector3.Cross (Vector3.up,dir); Vector3 normalUp = Vector3.Cross (dir,normal); normalUp = normalUp.normalized; normalUp *= dir.magnitude*0.1f; Vector3 p1c = p1+normalUp; Vector3 p2c = p2+normalUp; Vector3 prev = p1; for (int i=1;i<=20;i++) { float t = i/20.0f; Vector3 p = AstarMath.CubicBezier (p1,p1c,p2c,p2,t); Gizmos.DrawLine (prev,p); prev = p; } } public virtual void OnDrawGizmosSelected () { OnDrawGizmos(true); } public void OnDrawGizmos () { OnDrawGizmos (false); } public void OnDrawGizmos (bool selected) { Color col = selected ? GizmosColorSelected : GizmosColor; if (StartTransform != null) { DrawCircle(StartTransform.position,0.4f,10,col); } if (EndTransform != null) { DrawCircle(EndTransform.position,0.4f,10,col); } if (StartTransform != null && EndTransform != null) { Gizmos.color = col; DrawGizmoBezier (StartTransform.position,EndTransform.position); if (selected) { Vector3 cross = Vector3.Cross (Vector3.up, (EndTransform.position-StartTransform.position)).normalized; DrawGizmoBezier (StartTransform.position+cross*0.1f,EndTransform.position+cross*0.1f); DrawGizmoBezier (StartTransform.position-cross*0.1f,EndTransform.position-cross*0.1f); } } } } }
31.315789
189
0.681569
[ "MIT" ]
Warhead-Entertainment/OpenWorld
Assets/AstarPathfindingProject/Core/Misc/NodeLink2.cs
8,925
C#
/* * Alessandro Cagliostro, 2021 * * https://github.com/alecgn */ using CryptHash.Net.Hash; using CryptHash.Net.Hash.HashResults; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace CryptHash.Net.Tests.Hash { [TestClass] public class HMAC_SHA_1_Tests { private readonly HMAC_SHA_1 _hmacSha1 = new HMAC_SHA_1(); private readonly string _testString = "This is a test string!"; [TestMethod] public void ComputeAndVerifyHMAC_String() { var verifyResult = new HMACHashResult(); var errorMessage = ""; var hmacResult = _hmacSha1.ComputeHMAC(_testString); if (hmacResult.Success) { verifyResult = _hmacSha1.VerifyHMAC(hmacResult.HashString, _testString, hmacResult.Key); if (!verifyResult.Success) { errorMessage = verifyResult.Message; } } else { errorMessage = hmacResult.Message; } Assert.IsTrue((hmacResult.Success && verifyResult.Success), errorMessage); } } }
26.244444
104
0.577477
[ "MIT" ]
alecgn/crypthash-net
src/CryptHash.Net/lib/CryptHash.Net.Tests/Hash/HMAC_SHA_1_Tests.cs
1,183
C#
using AutoMapper; using Crossroads.Models.Profile; using Crossroads.Web.Infrastructure.Mappings; using System; using System.Linq; namespace Crossroads.Web.ViewModels.ProfileViewModels.Comments { public class CommentViewModel : IMapFrom<ProfileComment>, IHaveCustomMappings { public int Id { get; set; } public string Content { get; set; } public string AuthorName { get; set; } public string ProfileUserName { get; set; } public DateTime DateCreated { get; set; } public string Image { get; set; } public void CreateMappings(IConfiguration configuration) { configuration.CreateMap<ProfileComment, CommentViewModel>() .ForMember(c => c.AuthorName, opt => opt.MapFrom(c => c.AuthorProfile.ProfileUser.UserName)) .ForMember(c => c.ProfileUserName, opt => opt.MapFrom(c => c.Profile.ProfileUser.UserName)) .ForMember(c => c.Image, opt => opt.MapFrom(c => c.AuthorProfile.Image)) .ReverseMap(); } } }
33.21875
108
0.647225
[ "MIT" ]
nevena-angelova/Crossroads
Source/Crossroads.Web/ViewModels/ProfileViewModels/Comments/CommentViewModel.cs
1,065
C#
// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. // Ported from um/MsHTML.h in the Windows SDK for Windows 10.0.20348.0 // Original source is Copyright © Microsoft. All rights reserved. using NUnit.Framework; using System; using System.Runtime.InteropServices; using static TerraFX.Interop.Windows.IID; namespace TerraFX.Interop.Windows.UnitTests; /// <summary>Provides validation of the <see cref="ISVGAnimatedInteger" /> struct.</summary> public static unsafe partial class ISVGAnimatedIntegerTests { /// <summary>Validates that the <see cref="Guid" /> of the <see cref="ISVGAnimatedInteger" /> struct is correct.</summary> [Test] public static void GuidOfTest() { Assert.That(typeof(ISVGAnimatedInteger).GUID, Is.EqualTo(IID_ISVGAnimatedInteger)); } /// <summary>Validates that the <see cref="ISVGAnimatedInteger" /> struct is blittable.</summary> [Test] public static void IsBlittableTest() { Assert.That(Marshal.SizeOf<ISVGAnimatedInteger>(), Is.EqualTo(sizeof(ISVGAnimatedInteger))); } /// <summary>Validates that the <see cref="ISVGAnimatedInteger" /> struct has the right <see cref="LayoutKind" />.</summary> [Test] public static void IsLayoutSequentialTest() { Assert.That(typeof(ISVGAnimatedInteger).IsLayoutSequential, Is.True); } /// <summary>Validates that the <see cref="ISVGAnimatedInteger" /> struct has the correct size.</summary> [Test] public static void SizeOfTest() { if (Environment.Is64BitProcess) { Assert.That(sizeof(ISVGAnimatedInteger), Is.EqualTo(8)); } else { Assert.That(sizeof(ISVGAnimatedInteger), Is.EqualTo(4)); } } }
35.921569
145
0.694323
[ "MIT" ]
IngmarBitter/terrafx.interop.windows
tests/Interop/Windows/Windows/um/MsHTML/ISVGAnimatedIntegerTests.cs
1,834
C#
namespace OmniXaml.ObjectAssembler.Commands { using System.Collections; public class GetObjectCommand : Command { public GetObjectCommand(StateCommuter stateCommuter) : base(stateCommuter) { } public override void Execute() { var previousMember = StateCommuter.Current.Member; StateCommuter.RaiseLevel(); StateCommuter.Current.IsGetObject = true; var instanceToGet = StateCommuter.ValueOfPreviousInstanceAndItsMember; StateCommuter.Current.Instance = instanceToGet; StateCommuter.Current.Member = previousMember; var collection = instanceToGet as ICollection; if (collection != null) { StateCommuter.Current.Collection = collection; } } public override string ToString() { return "Get Object"; } } }
28.848485
82
0.598739
[ "MIT" ]
AvaloniaUI/OmniXAML
Source/OmniXaml/ObjectAssembler/Commands/GetObjectCommand.cs
952
C#
/* * Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ namespace TencentCloud.Dayu.V20180709.Models { using Newtonsoft.Json; using System.Collections.Generic; using TencentCloud.Common; public class DescribeUnBlockStatisRequest : AbstractModel { /// <summary> /// For internal usage only. DO NOT USE IT. /// </summary> public override void ToMap(Dictionary<string, string> map, string prefix) { } } }
29.162162
81
0.687674
[ "Apache-2.0" ]
TencentCloud/tencentcloud-sdk-dotnet
TencentCloud/Dayu/V20180709/Models/DescribeUnBlockStatisRequest.cs
1,079
C#
using System.IO; using System.Runtime.Serialization; using GameEstate.Red.Formats.Red.CR2W.Reflection; using FastMember; using static GameEstate.Red.Formats.Red.Records.Enums; namespace GameEstate.Red.Formats.Red.Types { [DataContract(Namespace = "")] [REDMeta] public class W3TrapSpawnEntity : W3Trap { [Ordinal(1)] [RED("spawnOnlyOnAreaEnter")] public CBool SpawnOnlyOnAreaEnter { get; set;} [Ordinal(2)] [RED("maxSpawns")] public CFloat MaxSpawns { get; set;} [Ordinal(3)] [RED("entityToSpawn")] public CHandle<CEntityTemplate> EntityToSpawn { get; set;} [Ordinal(4)] [RED("offsetVector")] public Vector OffsetVector { get; set;} [Ordinal(5)] [RED("excludedActorsTags", 2,0)] public CArray<CName> ExcludedActorsTags { get; set;} [Ordinal(6)] [RED("appearanceAfterFirstSpawn")] public CString AppearanceAfterFirstSpawn { get; set;} [Ordinal(7)] [RED("m_Spawns")] public CInt32 M_Spawns { get; set;} public W3TrapSpawnEntity(CR2WFile cr2w, CVariable parent, string name) : base(cr2w, parent, name){ } public static new CVariable Create(CR2WFile cr2w, CVariable parent, string name) => new W3TrapSpawnEntity(cr2w, parent, name); public override void Read(BinaryReader file, uint size) => base.Read(file, size); public override void Write(BinaryWriter file) => base.Write(file); } }
37.054054
129
0.71116
[ "MIT" ]
bclnet/GameEstate
src/Estates/Red/GameEstate.Red.Format/Red/W3/RTTIConvert/W3TrapSpawnEntity.cs
1,371
C#
namespace Demo.Data { public class CategoryFindRequest : BaseFindRequest { public string Name { get; set; } } }
16.625
54
0.631579
[ "MIT" ]
trungnguyendlu/demo-asp-net-core
Demo.Data/Category/CategoryFindRequest.cs
135
C#
using FRED.Api.Tags.Arguments; namespace FRED.Api.Releases.Arguments { /// <summary> /// Provides argument properties for the ReleaseRelatedTags API facade. /// </summary> public class ReleaseRelatedTagsArguments : RelatedTagsArguments { #region properties public int release_id { get; set; } internal override string UrlExtension { get { return "release/related_tags"; } } #endregion } }
18.086957
72
0.723558
[ "MIT" ]
rcapel/FRED-API-Toolkit
Version 2.0/FREDApi/FREDApi/Releases/Arguments/ReleaseRelatedTagsArguments.cs
418
C#
using System; using System.Collections.Generic; using System.Linq; using Microsoft.AspNet.Identity; using Microsoft.AspNet.Identity.EntityFramework; using Microsoft.Owin; using Microsoft.Owin.Security.Cookies; using Microsoft.Owin.Security.Google; using Microsoft.Owin.Security.OAuth; using Owin; using TinderChallenge.Models; namespace TinderChallenge { public partial class Startup { public static OAuthAuthorizationServerOptions OAuthOptions { get; private set; } public static string PublicClientId { get; private set; } // For more information on configuring authentication, please visit http://go.microsoft.com/fwlink/?LinkId=301864 public void ConfigureAuth(IAppBuilder app) { } } }
26.964286
121
0.749669
[ "MIT" ]
aamdani/TinderChallenge
TinderChallenge/App_Start/Startup.Auth.cs
757
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the shield-2016-06-02.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.Shield.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Shield.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ProtectionLimits Object /// </summary> public class ProtectionLimitsUnmarshaller : IUnmarshaller<ProtectionLimits, XmlUnmarshallerContext>, IUnmarshaller<ProtectionLimits, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> ProtectionLimits IUnmarshaller<ProtectionLimits, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public ProtectionLimits Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; ProtectionLimits unmarshalledObject = new ProtectionLimits(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ProtectedResourceTypeLimits", targetDepth)) { var unmarshaller = new ListUnmarshaller<Limit, LimitUnmarshaller>(LimitUnmarshaller.Instance); unmarshalledObject.ProtectedResourceTypeLimits = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static ProtectionLimitsUnmarshaller _instance = new ProtectionLimitsUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ProtectionLimitsUnmarshaller Instance { get { return _instance; } } } }
34.51087
161
0.649134
[ "Apache-2.0" ]
ChristopherButtars/aws-sdk-net
sdk/src/Services/Shield/Generated/Model/Internal/MarshallTransformations/ProtectionLimitsUnmarshaller.cs
3,175
C#
using System; namespace MyFood.Domain.Core.Models { public abstract class Entity { public Guid Id { get; protected set; } public override bool Equals(object obj) { var compareTo = obj as Entity; if (ReferenceEquals(this, compareTo)) return true; if (ReferenceEquals(null, compareTo)) return false; return Id.Equals(compareTo.Id); } public static bool operator ==(Entity a, Entity b) { if (ReferenceEquals(a, null) && ReferenceEquals(b, null)) return true; if (ReferenceEquals(a, null) || ReferenceEquals(b, null)) return false; return a.Equals(b); } public static bool operator !=(Entity a, Entity b) { return !(a == b); } public override int GetHashCode() { return (GetType().GetHashCode() * 907) + Id.GetHashCode(); } public override string ToString() { return GetType().Name + " [Id=" + Id + "]"; } } }
24.108696
70
0.519387
[ "MIT" ]
raphaelruedo/MyFood
MyFood.Domain/MyFood.Domain.Core/Models/Entity.cs
1,111
C#
// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; namespace NuGet.Services.Validation { public class ValidatorIssue : BaseValidationIssue { /// <summary> /// The validation ID that this issue is related to. This is a foreign key to the <see cref="ValidatorStatus"/> /// entity. /// </summary> public Guid ValidationId { get; set; } /// <summary> /// The <see cref="ValidatorStatus"/> that has this issue. /// </summary> public ValidatorStatus ValidatorStatus { get; set; } } }
31.636364
119
0.636494
[ "Apache-2.0" ]
DalavanCloud/ServerCommon
src/NuGet.Services.Validation/Entities/ValidatorIssue.cs
698
C#
using System; using System.Net; using Ruffles.Connections; using Ruffles.Memory; using Ruffles.Time; namespace Ruffles.Core { /// <summary> /// Struct representing a network event. /// </summary> public struct NetworkEvent { /// <summary> /// Gets the event type. /// </summary> /// <value>The event type.</value> public NetworkEventType Type { get; internal set; } /// <summary> /// Gets the RuffleSocket the event occured on. /// </summary> /// <value>The RuffleSocket the event occured on.</value> public RuffleSocket Socket { get; internal set; } /// <summary> /// Gets the connection of the event. /// </summary> /// <value>The connection of the event.</value> public Connection Connection { get; internal set; } /// <summary> /// Gets an array segment of the borrowed memory. Only avalible when type is Data. /// Once used, the Recycle method should be called on the event to prevent a memory leak. /// </summary> /// <value>The data segement.</value> public ArraySegment<byte> Data { get; internal set; } /// <summary> /// Gets the time the event was received on the socket. /// Useful for calculating exact receive times. /// </summary> /// <value>The socket receive time.</value> public NetTime SocketReceiveTime { get; internal set; } /// <summary> /// Gets the channelId the message was sent over. /// </summary> /// <value>The channelId the message was sent over.</value> public byte ChannelId { get; internal set; } /// <summary> /// Gets the endpoint the message was sent from. /// </summary> /// <value>The endpoint the message was sent from.</value> public EndPoint EndPoint { get; internal set; } /// <summary> /// Gets the notification key. /// </summary> /// <value>The notification key.</value> public ulong NotificationKey { get; internal set; } internal HeapMemory InternalMemory; internal MemoryManager MemoryManager; internal bool AllowUserRecycle; /// <summary> /// Recycles the memory associated with the event. /// </summary> public void Recycle() { if (InternalMemory != null && MemoryManager != null) { if (AllowUserRecycle) { MemoryManager.DeAlloc(InternalMemory); } } } } }
34.828947
97
0.56479
[ "MIT" ]
dungeon2567/Ruffles
Ruffles/Core/NetworkEvent.cs
2,649
C#
namespace P01_HospitalDatabase.Data.Models { public class Diagnose { public int DiagnoseId { get; set; } public string Name { get; set; } public string Comments { get; set; } public int PatientId { get; set; } public Patient Patient { get; set; } } }
21.5
50
0.526163
[ "MIT" ]
AntoniyaIvanova/SoftUni
C#/C# DB/Entity Framework Core/02. Code-First/01.HospitalDatabase/Data/Models/Diagnose.cs
346
C#
// <auto-generated /> using System; using A0007_EF_QueryFilter.DataAccess; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; namespace A0007_EF_QueryFilter.Migrations { [DbContext(typeof(TestContext))] partial class TestContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "2.2.0-rtm-35687") .HasAnnotation("Relational:MaxIdentifierLength", 128) .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); modelBuilder.Entity("A0007_EF_QueryFilter.Model.Document", b => { b.Property<long>("DocumentID") .ValueGeneratedOnAdd() .HasColumnName("document_id") .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); b.Property<DateTime>("CreateTime") .HasColumnName("create_time"); b.Property<string>("CreateUser") .HasColumnName("create_user") .HasMaxLength(32); b.Property<string>("DocumentContent") .HasColumnName("document_content"); b.Property<string>("DocumentTitle") .IsRequired() .HasColumnName("document_title") .HasMaxLength(64); b.Property<string>("DocumentTypeCode") .HasColumnName("document_type_code") .HasMaxLength(32); b.Property<DateTime>("LastUpdateTime") .IsConcurrencyToken() .HasColumnName("last_update_time"); b.Property<string>("LastUpdateUser") .HasColumnName("last_update_user") .HasMaxLength(32); b.Property<string>("Status") .HasColumnName("status") .HasMaxLength(16); b.HasKey("DocumentID"); b.HasIndex("DocumentTypeCode"); b.ToTable("document"); }); modelBuilder.Entity("A0007_EF_QueryFilter.Model.DocumentType", b => { b.Property<string>("DocumentTypeCode") .ValueGeneratedOnAdd() .HasColumnName("document_type_code") .HasMaxLength(32); b.Property<DateTime>("CreateTime") .HasColumnName("create_time"); b.Property<string>("CreateUser") .HasColumnName("create_user") .HasMaxLength(32); b.Property<string>("DocumentTypeName") .HasColumnName("document_type_name") .HasMaxLength(64); b.Property<DateTime>("LastUpdateTime") .IsConcurrencyToken() .HasColumnName("last_update_time"); b.Property<string>("LastUpdateUser") .HasColumnName("last_update_user") .HasMaxLength(32); b.Property<string>("Status") .HasColumnName("status") .HasMaxLength(16); b.HasKey("DocumentTypeCode"); b.ToTable("document_type"); }); modelBuilder.Entity("A0007_EF_QueryFilter.Model.TestData", b => { b.Property<long>("ID") .ValueGeneratedOnAdd() .HasColumnName("id") .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); b.Property<string>("Address") .HasColumnName("address") .HasMaxLength(64); b.Property<string>("Name") .HasColumnName("name") .HasMaxLength(16); b.Property<string>("Phone") .HasColumnName("phone") .HasMaxLength(16); b.HasKey("ID"); b.ToTable("test_data"); }); modelBuilder.Entity("A0007_EF_QueryFilter.Model.Document", b => { b.HasOne("A0007_EF_QueryFilter.Model.DocumentType", "DocumentType") .WithMany("DocumentList") .HasForeignKey("DocumentTypeCode"); }); #pragma warning restore 612, 618 } } }
37.669118
125
0.500293
[ "MIT" ]
wangzhiqing999/my-dotnetcore-sample
A0007_EF_QueryFilter/A0007_EF_QueryFilter/Migrations/TestContextModelSnapshot.cs
5,125
C#
using Microsoft.AspNetCore.Identity; namespace WebWallet.Web.ConfigurationOptions { public static class IdentityConfiguration { public static void Options(IdentityOptions options) { options.Stores.MaxLengthForKeys = 128; options.SignIn.RequireConfirmedEmail = true; options.Password.RequireDigit = true; options.Password.RequireLowercase = true; options.Password.RequireUppercase = true; options.Password.RequiredUniqueChars = 1; options.Password.RequireNonAlphanumeric = true; options.Password.RequiredLength = 8; } } }
34.368421
59
0.663093
[ "MIT" ]
VangelHristov/WebWallet
WebWallet.Web/ConfigurationOptions/IdentityConfiguration.cs
653
C#
//------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ namespace Lp.Model.EarlyBound { [System.Runtime.Serialization.DataContractAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("CrmSvcUtil", "9.0.0.9369")] public enum PurchaseProcess { [System.Runtime.Serialization.EnumMemberAttribute()] Committee = 1, [System.Runtime.Serialization.EnumMemberAttribute()] Individual = 0, [System.Runtime.Serialization.EnumMemberAttribute()] Unknown = 2, } }
29.111111
80
0.575064
[ "Unlicense" ]
DEFRA/license-and-permitting-dynamics
Crm/LicensingandPermitting/Defra.Lp/Model.Lp/EarlyBound/OptionSets/PurchaseProcess.cs
786
C#
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; // Put into the same namespace of Entities to skip using its reference namespace on inherit namespace ThreeLayerSample.Domain.Entities { public interface IEntityBase<TKey> { TKey Id { get; set; } } public abstract class EntityBase<TKey> : IEntityBase<TKey> { [Key] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public virtual TKey Id { get; set; } } }
27.157895
91
0.707364
[ "MIT" ]
uyen-luu/3-layer
ThreeLayerSample.Domain/Base/EntityBase.cs
518
C#
// Copyright (C) 2010-2011 Anders Gustafsson and others. All Rights Reserved. // This code is published under the Eclipse Public License. // // Author: Anders Gustafsson, Cureos AB 2011-12-14 namespace FuncLib.Optimization.Ipopt.Cureos { /// <summary> /// Enumeration of the available index styles for the Jacobian and Hessian index arrays. /// </summary> public enum IpoptIndexStyle { C = 0, Fortran = 1 } }
24.823529
89
0.720379
[ "MIT" ]
lionpeloux/FuncLib
src/FuncLibIpopt/Ipopt/Cureos/IpoptIndexStyle.cs
424
C#
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Models.Api20201001Preview { using static Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Runtime.Extensions; /// <summary>An error response from the service.</summary> public partial class CloudError { /// <summary> /// <c>AfterFromJson</c> will be called after the json deserialization has finished, allowing customization of the object /// before it is returned. Implement this method in a partial class to enable this behavior /// </summary> /// <param name="json">The JsonNode that should be deserialized into this object.</param> partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Runtime.Json.JsonObject json); /// <summary> /// <c>AfterToJson</c> will be called after the json erialization has finished, allowing customization of the <see cref="Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Runtime.Json.JsonObject" /// /> before it is returned. Implement this method in a partial class to enable this behavior /// </summary> /// <param name="container">The JSON container that the serialization result will be placed in.</param> partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Runtime.Json.JsonObject container); /// <summary> /// <c>BeforeFromJson</c> will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. /// If you wish to disable the default deserialization entirely, return <c>true</c> in the <see "returnNow" /> output parameter. /// Implement this method in a partial class to enable this behavior. /// </summary> /// <param name="json">The JsonNode that should be deserialized into this object.</param> /// <param name="returnNow">Determines if the rest of the deserialization should be processed, or if the method should return /// instantly.</param> partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Runtime.Json.JsonObject json, ref bool returnNow); /// <summary> /// <c>BeforeToJson</c> will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. /// If you wish to disable the default serialization entirely, return <c>true</c> in the <see "returnNow" /> output parameter. /// Implement this method in a partial class to enable this behavior. /// </summary> /// <param name="container">The JSON container that the serialization result will be placed in.</param> /// <param name="returnNow">Determines if the rest of the serialization should be processed, or if the method should return /// instantly.</param> partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Runtime.Json.JsonObject container, ref bool returnNow); /// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Runtime.Json.JsonObject into a new instance of <see cref="CloudError" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Runtime.Json.JsonObject instance to deserialize from.</param> internal CloudError(Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } {_error = If( json?.PropertyT<Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Runtime.Json.JsonObject>("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Models.Api20201001Preview.CloudErrorBody.FromJson(__jsonError) : Error;} AfterFromJson(json); } /// <summary> /// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Models.Api20201001Preview.ICloudError. /// </summary> /// <param name="node">a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Runtime.Json.JsonNode" /> to deserialize from.</param> /// <returns> /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Models.Api20201001Preview.ICloudError. /// </returns> public static Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Models.Api20201001Preview.ICloudError FromJson(Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Runtime.Json.JsonObject json ? new CloudError(json) : null; } /// <summary> /// Serializes this instance of <see cref="CloudError" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Runtime.Json.JsonNode" />. /// </summary> /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param> /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Runtime.SerializationMode"/>.</param> /// <returns> /// a serialized instance of <see cref="CloudError" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Runtime.Json.JsonNode" />. /// </returns> public Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Runtime.SerializationMode serializationMode) { container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Runtime.Json.JsonObject(); bool returnNow = false; BeforeToJson(ref container, ref returnNow); if (returnNow) { return container; } AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.Resources.Authorization.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "error" ,container.Add ); AfterToJson(ref container); return container; } } }
69.367925
301
0.697946
[ "MIT" ]
Agazoth/azure-powershell
src/Resources/Authorization.Autorest/generated/api/Models/Api20201001Preview/CloudError.json.cs
7,248
C#
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // <auto-generated/> #nullable disable using System; using System.Collections; using System.Collections.Generic; namespace Azure.Analytics.Synapse.Artifacts.Models { /// <summary> The connection used to execute the SQL script. </summary> public partial class SqlConnection : IDictionary<string, object> { /// <summary> Initializes a new instance of SqlConnection. </summary> /// <param name="type"> The type of the connection. </param> /// <param name="name"> The identifier of the connection. </param> public SqlConnection(SqlConnectionType type, string name) { if (name == null) { throw new ArgumentNullException(nameof(name)); } Type = type; Name = name; AdditionalProperties = new Dictionary<string, object>(); } /// <summary> Initializes a new instance of SqlConnection. </summary> /// <param name="type"> The type of the connection. </param> /// <param name="name"> The identifier of the connection. </param> /// <param name="additionalProperties"> . </param> internal SqlConnection(SqlConnectionType type, string name, IDictionary<string, object> additionalProperties) { Type = type; Name = name; AdditionalProperties = additionalProperties ?? new Dictionary<string, object>(); } /// <summary> The type of the connection. </summary> public SqlConnectionType Type { get; set; } /// <summary> The identifier of the connection. </summary> public string Name { get; set; } internal IDictionary<string, object> AdditionalProperties { get; } /// <inheritdoc /> public IEnumerator<KeyValuePair<string, object>> GetEnumerator() => AdditionalProperties.GetEnumerator(); /// <inheritdoc /> IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator(); /// <inheritdoc /> public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value); /// <inheritdoc /> public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key); /// <inheritdoc /> public ICollection<string> Keys => AdditionalProperties.Keys; /// <inheritdoc /> public ICollection<object> Values => AdditionalProperties.Values; /// <inheritdoc /> int ICollection<KeyValuePair<string, object>>.Count => AdditionalProperties.Count; /// <inheritdoc /> public void Add(string key, object value) => AdditionalProperties.Add(key, value); /// <inheritdoc /> public bool Remove(string key) => AdditionalProperties.Remove(key); /// <inheritdoc /> bool ICollection<KeyValuePair<string, object>>.IsReadOnly => AdditionalProperties.IsReadOnly; /// <inheritdoc /> void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> value) => AdditionalProperties.Add(value); /// <inheritdoc /> bool ICollection<KeyValuePair<string, object>>.Remove(KeyValuePair<string, object> value) => AdditionalProperties.Remove(value); /// <inheritdoc /> bool ICollection<KeyValuePair<string, object>>.Contains(KeyValuePair<string, object> value) => AdditionalProperties.Contains(value); /// <inheritdoc /> void ICollection<KeyValuePair<string, object>>.CopyTo(KeyValuePair<string, object>[] destination, int offset) => AdditionalProperties.CopyTo(destination, offset); /// <inheritdoc /> void ICollection<KeyValuePair<string, object>>.Clear() => AdditionalProperties.Clear(); /// <inheritdoc /> public object this[string key] { get => AdditionalProperties[key]; set => AdditionalProperties[key] = value; } } }
46.616279
170
0.643303
[ "MIT" ]
AzureDataBox/azure-sdk-for-net
sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/SqlConnection.cs
4,009
C#
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace FoodOrdering.BLL.Requests.DTO { public class MenuMeal { public long MenuId { get; set; } public long MealId { get; set; } public string DayOfWeek { get; set; } } }
18.8125
39
0.730897
[ "Apache-2.0" ]
nikola-jovic/FoodOrdering
FoodOrdering.BLL/Requests/DTO/MenuMeal.cs
303
C#
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System; using System.Runtime.InteropServices; using System.Runtime.CompilerServices; using System.Text; using Silk.NET.Core; using Silk.NET.Core.Native; using Silk.NET.Core.Attributes; using Silk.NET.Core.Contexts; using Silk.NET.Core.Loader; #pragma warning disable 1591 namespace Silk.NET.Direct3D12 { [Guid("5b160d0f-ac1b-4185-8ba8-b3ae42a5a455")] [NativeName("Name", "ID3D12GraphicsCommandList")] public unsafe partial struct ID3D12GraphicsCommandList { public static readonly Guid Guid = new("5b160d0f-ac1b-4185-8ba8-b3ae42a5a455"); public static implicit operator ID3D12CommandList(ID3D12GraphicsCommandList val) => Unsafe.As<ID3D12GraphicsCommandList, ID3D12CommandList>(ref val); public static implicit operator ID3D12DeviceChild(ID3D12GraphicsCommandList val) => Unsafe.As<ID3D12GraphicsCommandList, ID3D12DeviceChild>(ref val); public static implicit operator ID3D12Object(ID3D12GraphicsCommandList val) => Unsafe.As<ID3D12GraphicsCommandList, ID3D12Object>(ref val); public static implicit operator Silk.NET.Core.Native.IUnknown(ID3D12GraphicsCommandList val) => Unsafe.As<ID3D12GraphicsCommandList, Silk.NET.Core.Native.IUnknown>(ref val); public ID3D12GraphicsCommandList ( void** lpVtbl = null ) : this() { if (lpVtbl is not null) { LpVtbl = lpVtbl; } } [NativeName("Type", "")] [NativeName("Type.Name", "")] [NativeName("Name", "lpVtbl")] public void** LpVtbl; /// <summary>To be documented.</summary> public readonly unsafe int QueryInterface(Guid* riid, void** ppvObject) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); int ret = default; #if NET5_0_OR_GREATER ret = ((delegate* unmanaged<ID3D12GraphicsCommandList*, Guid*, void**, int>)LpVtbl[0])(@this, riid, ppvObject); #else if (SilkMarshal.IsWinapiStdcall) { ret = ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, Guid*, void**, int>)LpVtbl[0])(@this, riid, ppvObject); } else { ret = ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, Guid*, void**, int>)LpVtbl[0])(@this, riid, ppvObject); } #endif return ret; } /// <summary>To be documented.</summary> public readonly unsafe int QueryInterface(Guid* riid, ref void* ppvObject) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); int ret = default; fixed (void** ppvObjectPtr = &ppvObject) { #if NET5_0_OR_GREATER ret = ((delegate* unmanaged<ID3D12GraphicsCommandList*, Guid*, void**, int>)LpVtbl[0])(@this, riid, ppvObjectPtr); #else if (SilkMarshal.IsWinapiStdcall) { ret = ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, Guid*, void**, int>)LpVtbl[0])(@this, riid, ppvObjectPtr); } else { ret = ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, Guid*, void**, int>)LpVtbl[0])(@this, riid, ppvObjectPtr); } #endif } return ret; } /// <summary>To be documented.</summary> public readonly unsafe int QueryInterface(ref Guid riid, void** ppvObject) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); int ret = default; fixed (Guid* riidPtr = &riid) { #if NET5_0_OR_GREATER ret = ((delegate* unmanaged<ID3D12GraphicsCommandList*, Guid*, void**, int>)LpVtbl[0])(@this, riidPtr, ppvObject); #else if (SilkMarshal.IsWinapiStdcall) { ret = ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, Guid*, void**, int>)LpVtbl[0])(@this, riidPtr, ppvObject); } else { ret = ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, Guid*, void**, int>)LpVtbl[0])(@this, riidPtr, ppvObject); } #endif } return ret; } /// <summary>To be documented.</summary> public readonly unsafe int QueryInterface(ref Guid riid, ref void* ppvObject) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); int ret = default; fixed (Guid* riidPtr = &riid) { fixed (void** ppvObjectPtr = &ppvObject) { #if NET5_0_OR_GREATER ret = ((delegate* unmanaged<ID3D12GraphicsCommandList*, Guid*, void**, int>)LpVtbl[0])(@this, riidPtr, ppvObjectPtr); #else if (SilkMarshal.IsWinapiStdcall) { ret = ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, Guid*, void**, int>)LpVtbl[0])(@this, riidPtr, ppvObjectPtr); } else { ret = ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, Guid*, void**, int>)LpVtbl[0])(@this, riidPtr, ppvObjectPtr); } #endif } } return ret; } /// <summary>To be documented.</summary> public readonly uint AddRef() { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); uint ret = default; ret = ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, uint>)LpVtbl[1])(@this); return ret; } /// <summary>To be documented.</summary> public readonly uint Release() { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); uint ret = default; ret = ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, uint>)LpVtbl[2])(@this); return ret; } /// <summary>To be documented.</summary> public readonly unsafe int GetPrivateData(Guid* guid, uint* pDataSize, void* pData) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); int ret = default; #if NET5_0_OR_GREATER ret = ((delegate* unmanaged<ID3D12GraphicsCommandList*, Guid*, uint*, void*, int>)LpVtbl[3])(@this, guid, pDataSize, pData); #else if (SilkMarshal.IsWinapiStdcall) { ret = ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, Guid*, uint*, void*, int>)LpVtbl[3])(@this, guid, pDataSize, pData); } else { ret = ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, Guid*, uint*, void*, int>)LpVtbl[3])(@this, guid, pDataSize, pData); } #endif return ret; } /// <summary>To be documented.</summary> public readonly unsafe int GetPrivateData<T0>(Guid* guid, uint* pDataSize, ref T0 pData) where T0 : unmanaged { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); int ret = default; fixed (void* pDataPtr = &pData) { #if NET5_0_OR_GREATER ret = ((delegate* unmanaged<ID3D12GraphicsCommandList*, Guid*, uint*, void*, int>)LpVtbl[3])(@this, guid, pDataSize, pDataPtr); #else if (SilkMarshal.IsWinapiStdcall) { ret = ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, Guid*, uint*, void*, int>)LpVtbl[3])(@this, guid, pDataSize, pDataPtr); } else { ret = ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, Guid*, uint*, void*, int>)LpVtbl[3])(@this, guid, pDataSize, pDataPtr); } #endif } return ret; } /// <summary>To be documented.</summary> public readonly unsafe int GetPrivateData(Guid* guid, ref uint pDataSize, void* pData) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); int ret = default; fixed (uint* pDataSizePtr = &pDataSize) { #if NET5_0_OR_GREATER ret = ((delegate* unmanaged<ID3D12GraphicsCommandList*, Guid*, uint*, void*, int>)LpVtbl[3])(@this, guid, pDataSizePtr, pData); #else if (SilkMarshal.IsWinapiStdcall) { ret = ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, Guid*, uint*, void*, int>)LpVtbl[3])(@this, guid, pDataSizePtr, pData); } else { ret = ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, Guid*, uint*, void*, int>)LpVtbl[3])(@this, guid, pDataSizePtr, pData); } #endif } return ret; } /// <summary>To be documented.</summary> public readonly unsafe int GetPrivateData<T0>(Guid* guid, ref uint pDataSize, ref T0 pData) where T0 : unmanaged { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); int ret = default; fixed (uint* pDataSizePtr = &pDataSize) { fixed (void* pDataPtr = &pData) { #if NET5_0_OR_GREATER ret = ((delegate* unmanaged<ID3D12GraphicsCommandList*, Guid*, uint*, void*, int>)LpVtbl[3])(@this, guid, pDataSizePtr, pDataPtr); #else if (SilkMarshal.IsWinapiStdcall) { ret = ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, Guid*, uint*, void*, int>)LpVtbl[3])(@this, guid, pDataSizePtr, pDataPtr); } else { ret = ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, Guid*, uint*, void*, int>)LpVtbl[3])(@this, guid, pDataSizePtr, pDataPtr); } #endif } } return ret; } /// <summary>To be documented.</summary> public readonly unsafe int GetPrivateData(ref Guid guid, uint* pDataSize, void* pData) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); int ret = default; fixed (Guid* guidPtr = &guid) { #if NET5_0_OR_GREATER ret = ((delegate* unmanaged<ID3D12GraphicsCommandList*, Guid*, uint*, void*, int>)LpVtbl[3])(@this, guidPtr, pDataSize, pData); #else if (SilkMarshal.IsWinapiStdcall) { ret = ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, Guid*, uint*, void*, int>)LpVtbl[3])(@this, guidPtr, pDataSize, pData); } else { ret = ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, Guid*, uint*, void*, int>)LpVtbl[3])(@this, guidPtr, pDataSize, pData); } #endif } return ret; } /// <summary>To be documented.</summary> public readonly unsafe int GetPrivateData<T0>(ref Guid guid, uint* pDataSize, ref T0 pData) where T0 : unmanaged { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); int ret = default; fixed (Guid* guidPtr = &guid) { fixed (void* pDataPtr = &pData) { #if NET5_0_OR_GREATER ret = ((delegate* unmanaged<ID3D12GraphicsCommandList*, Guid*, uint*, void*, int>)LpVtbl[3])(@this, guidPtr, pDataSize, pDataPtr); #else if (SilkMarshal.IsWinapiStdcall) { ret = ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, Guid*, uint*, void*, int>)LpVtbl[3])(@this, guidPtr, pDataSize, pDataPtr); } else { ret = ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, Guid*, uint*, void*, int>)LpVtbl[3])(@this, guidPtr, pDataSize, pDataPtr); } #endif } } return ret; } /// <summary>To be documented.</summary> public readonly unsafe int GetPrivateData(ref Guid guid, ref uint pDataSize, void* pData) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); int ret = default; fixed (Guid* guidPtr = &guid) { fixed (uint* pDataSizePtr = &pDataSize) { #if NET5_0_OR_GREATER ret = ((delegate* unmanaged<ID3D12GraphicsCommandList*, Guid*, uint*, void*, int>)LpVtbl[3])(@this, guidPtr, pDataSizePtr, pData); #else if (SilkMarshal.IsWinapiStdcall) { ret = ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, Guid*, uint*, void*, int>)LpVtbl[3])(@this, guidPtr, pDataSizePtr, pData); } else { ret = ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, Guid*, uint*, void*, int>)LpVtbl[3])(@this, guidPtr, pDataSizePtr, pData); } #endif } } return ret; } /// <summary>To be documented.</summary> public readonly int GetPrivateData<T0>(ref Guid guid, ref uint pDataSize, ref T0 pData) where T0 : unmanaged { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); int ret = default; fixed (Guid* guidPtr = &guid) { fixed (uint* pDataSizePtr = &pDataSize) { fixed (void* pDataPtr = &pData) { #if NET5_0_OR_GREATER ret = ((delegate* unmanaged<ID3D12GraphicsCommandList*, Guid*, uint*, void*, int>)LpVtbl[3])(@this, guidPtr, pDataSizePtr, pDataPtr); #else if (SilkMarshal.IsWinapiStdcall) { ret = ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, Guid*, uint*, void*, int>)LpVtbl[3])(@this, guidPtr, pDataSizePtr, pDataPtr); } else { ret = ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, Guid*, uint*, void*, int>)LpVtbl[3])(@this, guidPtr, pDataSizePtr, pDataPtr); } #endif } } } return ret; } /// <summary>To be documented.</summary> public readonly unsafe int SetPrivateData(Guid* guid, uint DataSize, void* pData) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); int ret = default; #if NET5_0_OR_GREATER ret = ((delegate* unmanaged<ID3D12GraphicsCommandList*, Guid*, uint, void*, int>)LpVtbl[4])(@this, guid, DataSize, pData); #else if (SilkMarshal.IsWinapiStdcall) { ret = ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, Guid*, uint, void*, int>)LpVtbl[4])(@this, guid, DataSize, pData); } else { ret = ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, Guid*, uint, void*, int>)LpVtbl[4])(@this, guid, DataSize, pData); } #endif return ret; } /// <summary>To be documented.</summary> public readonly unsafe int SetPrivateData<T0>(Guid* guid, uint DataSize, ref T0 pData) where T0 : unmanaged { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); int ret = default; fixed (void* pDataPtr = &pData) { #if NET5_0_OR_GREATER ret = ((delegate* unmanaged<ID3D12GraphicsCommandList*, Guid*, uint, void*, int>)LpVtbl[4])(@this, guid, DataSize, pDataPtr); #else if (SilkMarshal.IsWinapiStdcall) { ret = ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, Guid*, uint, void*, int>)LpVtbl[4])(@this, guid, DataSize, pDataPtr); } else { ret = ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, Guid*, uint, void*, int>)LpVtbl[4])(@this, guid, DataSize, pDataPtr); } #endif } return ret; } /// <summary>To be documented.</summary> public readonly unsafe int SetPrivateData(ref Guid guid, uint DataSize, void* pData) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); int ret = default; fixed (Guid* guidPtr = &guid) { #if NET5_0_OR_GREATER ret = ((delegate* unmanaged<ID3D12GraphicsCommandList*, Guid*, uint, void*, int>)LpVtbl[4])(@this, guidPtr, DataSize, pData); #else if (SilkMarshal.IsWinapiStdcall) { ret = ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, Guid*, uint, void*, int>)LpVtbl[4])(@this, guidPtr, DataSize, pData); } else { ret = ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, Guid*, uint, void*, int>)LpVtbl[4])(@this, guidPtr, DataSize, pData); } #endif } return ret; } /// <summary>To be documented.</summary> public readonly int SetPrivateData<T0>(ref Guid guid, uint DataSize, ref T0 pData) where T0 : unmanaged { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); int ret = default; fixed (Guid* guidPtr = &guid) { fixed (void* pDataPtr = &pData) { #if NET5_0_OR_GREATER ret = ((delegate* unmanaged<ID3D12GraphicsCommandList*, Guid*, uint, void*, int>)LpVtbl[4])(@this, guidPtr, DataSize, pDataPtr); #else if (SilkMarshal.IsWinapiStdcall) { ret = ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, Guid*, uint, void*, int>)LpVtbl[4])(@this, guidPtr, DataSize, pDataPtr); } else { ret = ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, Guid*, uint, void*, int>)LpVtbl[4])(@this, guidPtr, DataSize, pDataPtr); } #endif } } return ret; } /// <summary>To be documented.</summary> public readonly unsafe int SetPrivateDataInterface(Guid* guid, [Flow(FlowDirection.In)] Silk.NET.Core.Native.IUnknown* pData) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); int ret = default; #if NET5_0_OR_GREATER ret = ((delegate* unmanaged<ID3D12GraphicsCommandList*, Guid*, Silk.NET.Core.Native.IUnknown*, int>)LpVtbl[5])(@this, guid, pData); #else if (SilkMarshal.IsWinapiStdcall) { ret = ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, Guid*, Silk.NET.Core.Native.IUnknown*, int>)LpVtbl[5])(@this, guid, pData); } else { ret = ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, Guid*, Silk.NET.Core.Native.IUnknown*, int>)LpVtbl[5])(@this, guid, pData); } #endif return ret; } /// <summary>To be documented.</summary> public readonly unsafe int SetPrivateDataInterface(Guid* guid, [Flow(FlowDirection.In)] in Silk.NET.Core.Native.IUnknown pData) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); int ret = default; fixed (Silk.NET.Core.Native.IUnknown* pDataPtr = &pData) { #if NET5_0_OR_GREATER ret = ((delegate* unmanaged<ID3D12GraphicsCommandList*, Guid*, Silk.NET.Core.Native.IUnknown*, int>)LpVtbl[5])(@this, guid, pDataPtr); #else if (SilkMarshal.IsWinapiStdcall) { ret = ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, Guid*, Silk.NET.Core.Native.IUnknown*, int>)LpVtbl[5])(@this, guid, pDataPtr); } else { ret = ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, Guid*, Silk.NET.Core.Native.IUnknown*, int>)LpVtbl[5])(@this, guid, pDataPtr); } #endif } return ret; } /// <summary>To be documented.</summary> public readonly unsafe int SetPrivateDataInterface(ref Guid guid, [Flow(FlowDirection.In)] Silk.NET.Core.Native.IUnknown* pData) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); int ret = default; fixed (Guid* guidPtr = &guid) { #if NET5_0_OR_GREATER ret = ((delegate* unmanaged<ID3D12GraphicsCommandList*, Guid*, Silk.NET.Core.Native.IUnknown*, int>)LpVtbl[5])(@this, guidPtr, pData); #else if (SilkMarshal.IsWinapiStdcall) { ret = ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, Guid*, Silk.NET.Core.Native.IUnknown*, int>)LpVtbl[5])(@this, guidPtr, pData); } else { ret = ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, Guid*, Silk.NET.Core.Native.IUnknown*, int>)LpVtbl[5])(@this, guidPtr, pData); } #endif } return ret; } /// <summary>To be documented.</summary> public readonly int SetPrivateDataInterface(ref Guid guid, [Flow(FlowDirection.In)] in Silk.NET.Core.Native.IUnknown pData) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); int ret = default; fixed (Guid* guidPtr = &guid) { fixed (Silk.NET.Core.Native.IUnknown* pDataPtr = &pData) { #if NET5_0_OR_GREATER ret = ((delegate* unmanaged<ID3D12GraphicsCommandList*, Guid*, Silk.NET.Core.Native.IUnknown*, int>)LpVtbl[5])(@this, guidPtr, pDataPtr); #else if (SilkMarshal.IsWinapiStdcall) { ret = ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, Guid*, Silk.NET.Core.Native.IUnknown*, int>)LpVtbl[5])(@this, guidPtr, pDataPtr); } else { ret = ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, Guid*, Silk.NET.Core.Native.IUnknown*, int>)LpVtbl[5])(@this, guidPtr, pDataPtr); } #endif } } return ret; } /// <summary>To be documented.</summary> public readonly unsafe int SetName(char* Name) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); int ret = default; #if NET5_0_OR_GREATER ret = ((delegate* unmanaged<ID3D12GraphicsCommandList*, char*, int>)LpVtbl[6])(@this, Name); #else if (SilkMarshal.IsWinapiStdcall) { ret = ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, char*, int>)LpVtbl[6])(@this, Name); } else { ret = ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, char*, int>)LpVtbl[6])(@this, Name); } #endif return ret; } /// <summary>To be documented.</summary> public readonly int SetName(ref char Name) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); int ret = default; fixed (char* NamePtr = &Name) { #if NET5_0_OR_GREATER ret = ((delegate* unmanaged<ID3D12GraphicsCommandList*, char*, int>)LpVtbl[6])(@this, NamePtr); #else if (SilkMarshal.IsWinapiStdcall) { ret = ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, char*, int>)LpVtbl[6])(@this, NamePtr); } else { ret = ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, char*, int>)LpVtbl[6])(@this, NamePtr); } #endif } return ret; } /// <summary>To be documented.</summary> public readonly int SetName([UnmanagedType(Silk.NET.Core.Native.UnmanagedType.LPWStr)] string Name) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); int ret = default; var NamePtr = (byte*) SilkMarshal.StringToPtr(Name, NativeStringEncoding.LPWStr); #if NET5_0_OR_GREATER ret = ((delegate* unmanaged<ID3D12GraphicsCommandList*, byte*, int>)LpVtbl[6])(@this, NamePtr); #else if (SilkMarshal.IsWinapiStdcall) { ret = ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, byte*, int>)LpVtbl[6])(@this, NamePtr); } else { ret = ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, byte*, int>)LpVtbl[6])(@this, NamePtr); } #endif SilkMarshal.Free((nint)NamePtr); return ret; } /// <summary>To be documented.</summary> public readonly unsafe int GetDevice(Guid* riid, void** ppvDevice) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); int ret = default; #if NET5_0_OR_GREATER ret = ((delegate* unmanaged<ID3D12GraphicsCommandList*, Guid*, void**, int>)LpVtbl[7])(@this, riid, ppvDevice); #else if (SilkMarshal.IsWinapiStdcall) { ret = ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, Guid*, void**, int>)LpVtbl[7])(@this, riid, ppvDevice); } else { ret = ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, Guid*, void**, int>)LpVtbl[7])(@this, riid, ppvDevice); } #endif return ret; } /// <summary>To be documented.</summary> public readonly unsafe int GetDevice(Guid* riid, ref void* ppvDevice) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); int ret = default; fixed (void** ppvDevicePtr = &ppvDevice) { #if NET5_0_OR_GREATER ret = ((delegate* unmanaged<ID3D12GraphicsCommandList*, Guid*, void**, int>)LpVtbl[7])(@this, riid, ppvDevicePtr); #else if (SilkMarshal.IsWinapiStdcall) { ret = ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, Guid*, void**, int>)LpVtbl[7])(@this, riid, ppvDevicePtr); } else { ret = ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, Guid*, void**, int>)LpVtbl[7])(@this, riid, ppvDevicePtr); } #endif } return ret; } /// <summary>To be documented.</summary> public readonly unsafe int GetDevice(ref Guid riid, void** ppvDevice) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); int ret = default; fixed (Guid* riidPtr = &riid) { #if NET5_0_OR_GREATER ret = ((delegate* unmanaged<ID3D12GraphicsCommandList*, Guid*, void**, int>)LpVtbl[7])(@this, riidPtr, ppvDevice); #else if (SilkMarshal.IsWinapiStdcall) { ret = ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, Guid*, void**, int>)LpVtbl[7])(@this, riidPtr, ppvDevice); } else { ret = ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, Guid*, void**, int>)LpVtbl[7])(@this, riidPtr, ppvDevice); } #endif } return ret; } /// <summary>To be documented.</summary> public readonly unsafe int GetDevice(ref Guid riid, ref void* ppvDevice) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); int ret = default; fixed (Guid* riidPtr = &riid) { fixed (void** ppvDevicePtr = &ppvDevice) { #if NET5_0_OR_GREATER ret = ((delegate* unmanaged<ID3D12GraphicsCommandList*, Guid*, void**, int>)LpVtbl[7])(@this, riidPtr, ppvDevicePtr); #else if (SilkMarshal.IsWinapiStdcall) { ret = ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, Guid*, void**, int>)LpVtbl[7])(@this, riidPtr, ppvDevicePtr); } else { ret = ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, Guid*, void**, int>)LpVtbl[7])(@this, riidPtr, ppvDevicePtr); } #endif } } return ret; } /// <summary>To be documented.</summary> public readonly CommandListType GetType() { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); CommandListType ret = default; ret = ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, CommandListType>)LpVtbl[8])(@this); return ret; } /// <summary>To be documented.</summary> public readonly int Close() { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); int ret = default; ret = ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, int>)LpVtbl[9])(@this); return ret; } /// <summary>To be documented.</summary> public readonly unsafe int Reset(ID3D12CommandAllocator* pAllocator, ID3D12PipelineState* pInitialState) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); int ret = default; #if NET5_0_OR_GREATER ret = ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12CommandAllocator*, ID3D12PipelineState*, int>)LpVtbl[10])(@this, pAllocator, pInitialState); #else if (SilkMarshal.IsWinapiStdcall) { ret = ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12CommandAllocator*, ID3D12PipelineState*, int>)LpVtbl[10])(@this, pAllocator, pInitialState); } else { ret = ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12CommandAllocator*, ID3D12PipelineState*, int>)LpVtbl[10])(@this, pAllocator, pInitialState); } #endif return ret; } /// <summary>To be documented.</summary> public readonly unsafe int Reset(ID3D12CommandAllocator* pAllocator, ref ID3D12PipelineState pInitialState) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); int ret = default; fixed (ID3D12PipelineState* pInitialStatePtr = &pInitialState) { #if NET5_0_OR_GREATER ret = ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12CommandAllocator*, ID3D12PipelineState*, int>)LpVtbl[10])(@this, pAllocator, pInitialStatePtr); #else if (SilkMarshal.IsWinapiStdcall) { ret = ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12CommandAllocator*, ID3D12PipelineState*, int>)LpVtbl[10])(@this, pAllocator, pInitialStatePtr); } else { ret = ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12CommandAllocator*, ID3D12PipelineState*, int>)LpVtbl[10])(@this, pAllocator, pInitialStatePtr); } #endif } return ret; } /// <summary>To be documented.</summary> public readonly unsafe int Reset(ref ID3D12CommandAllocator pAllocator, ID3D12PipelineState* pInitialState) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); int ret = default; fixed (ID3D12CommandAllocator* pAllocatorPtr = &pAllocator) { #if NET5_0_OR_GREATER ret = ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12CommandAllocator*, ID3D12PipelineState*, int>)LpVtbl[10])(@this, pAllocatorPtr, pInitialState); #else if (SilkMarshal.IsWinapiStdcall) { ret = ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12CommandAllocator*, ID3D12PipelineState*, int>)LpVtbl[10])(@this, pAllocatorPtr, pInitialState); } else { ret = ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12CommandAllocator*, ID3D12PipelineState*, int>)LpVtbl[10])(@this, pAllocatorPtr, pInitialState); } #endif } return ret; } /// <summary>To be documented.</summary> public readonly int Reset(ref ID3D12CommandAllocator pAllocator, ref ID3D12PipelineState pInitialState) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); int ret = default; fixed (ID3D12CommandAllocator* pAllocatorPtr = &pAllocator) { fixed (ID3D12PipelineState* pInitialStatePtr = &pInitialState) { #if NET5_0_OR_GREATER ret = ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12CommandAllocator*, ID3D12PipelineState*, int>)LpVtbl[10])(@this, pAllocatorPtr, pInitialStatePtr); #else if (SilkMarshal.IsWinapiStdcall) { ret = ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12CommandAllocator*, ID3D12PipelineState*, int>)LpVtbl[10])(@this, pAllocatorPtr, pInitialStatePtr); } else { ret = ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12CommandAllocator*, ID3D12PipelineState*, int>)LpVtbl[10])(@this, pAllocatorPtr, pInitialStatePtr); } #endif } } return ret; } /// <summary>To be documented.</summary> public readonly unsafe void ClearState(ID3D12PipelineState* pPipelineState) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12PipelineState*, void>)LpVtbl[11])(@this, pPipelineState); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12PipelineState*, void>)LpVtbl[11])(@this, pPipelineState); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12PipelineState*, void>)LpVtbl[11])(@this, pPipelineState); } #endif } /// <summary>To be documented.</summary> public readonly void ClearState(ref ID3D12PipelineState pPipelineState) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12PipelineState* pPipelineStatePtr = &pPipelineState) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12PipelineState*, void>)LpVtbl[11])(@this, pPipelineStatePtr); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12PipelineState*, void>)LpVtbl[11])(@this, pPipelineStatePtr); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12PipelineState*, void>)LpVtbl[11])(@this, pPipelineStatePtr); } #endif } } /// <summary>To be documented.</summary> public readonly void DrawInstanced(uint VertexCountPerInstance, uint InstanceCount, uint StartVertexLocation, uint StartInstanceLocation) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, uint, uint, uint, uint, void>)LpVtbl[12])(@this, VertexCountPerInstance, InstanceCount, StartVertexLocation, StartInstanceLocation); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, uint, uint, uint, uint, void>)LpVtbl[12])(@this, VertexCountPerInstance, InstanceCount, StartVertexLocation, StartInstanceLocation); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, uint, uint, uint, uint, void>)LpVtbl[12])(@this, VertexCountPerInstance, InstanceCount, StartVertexLocation, StartInstanceLocation); } #endif } /// <summary>To be documented.</summary> public readonly void DrawIndexedInstanced(uint IndexCountPerInstance, uint InstanceCount, uint StartIndexLocation, int BaseVertexLocation, uint StartInstanceLocation) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, uint, uint, uint, int, uint, void>)LpVtbl[13])(@this, IndexCountPerInstance, InstanceCount, StartIndexLocation, BaseVertexLocation, StartInstanceLocation); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, uint, uint, uint, int, uint, void>)LpVtbl[13])(@this, IndexCountPerInstance, InstanceCount, StartIndexLocation, BaseVertexLocation, StartInstanceLocation); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, uint, uint, uint, int, uint, void>)LpVtbl[13])(@this, IndexCountPerInstance, InstanceCount, StartIndexLocation, BaseVertexLocation, StartInstanceLocation); } #endif } /// <summary>To be documented.</summary> public readonly void Dispatch(uint ThreadGroupCountX, uint ThreadGroupCountY, uint ThreadGroupCountZ) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, uint, uint, uint, void>)LpVtbl[14])(@this, ThreadGroupCountX, ThreadGroupCountY, ThreadGroupCountZ); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, uint, uint, uint, void>)LpVtbl[14])(@this, ThreadGroupCountX, ThreadGroupCountY, ThreadGroupCountZ); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, uint, uint, uint, void>)LpVtbl[14])(@this, ThreadGroupCountX, ThreadGroupCountY, ThreadGroupCountZ); } #endif } /// <summary>To be documented.</summary> public readonly unsafe void CopyBufferRegion(ID3D12Resource* pDstBuffer, ulong DstOffset, ID3D12Resource* pSrcBuffer, ulong SrcOffset, ulong NumBytes) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12Resource*, ulong, ID3D12Resource*, ulong, ulong, void>)LpVtbl[15])(@this, pDstBuffer, DstOffset, pSrcBuffer, SrcOffset, NumBytes); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12Resource*, ulong, ID3D12Resource*, ulong, ulong, void>)LpVtbl[15])(@this, pDstBuffer, DstOffset, pSrcBuffer, SrcOffset, NumBytes); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12Resource*, ulong, ID3D12Resource*, ulong, ulong, void>)LpVtbl[15])(@this, pDstBuffer, DstOffset, pSrcBuffer, SrcOffset, NumBytes); } #endif } /// <summary>To be documented.</summary> public readonly unsafe void CopyBufferRegion(ID3D12Resource* pDstBuffer, ulong DstOffset, ref ID3D12Resource pSrcBuffer, ulong SrcOffset, ulong NumBytes) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12Resource* pSrcBufferPtr = &pSrcBuffer) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12Resource*, ulong, ID3D12Resource*, ulong, ulong, void>)LpVtbl[15])(@this, pDstBuffer, DstOffset, pSrcBufferPtr, SrcOffset, NumBytes); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12Resource*, ulong, ID3D12Resource*, ulong, ulong, void>)LpVtbl[15])(@this, pDstBuffer, DstOffset, pSrcBufferPtr, SrcOffset, NumBytes); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12Resource*, ulong, ID3D12Resource*, ulong, ulong, void>)LpVtbl[15])(@this, pDstBuffer, DstOffset, pSrcBufferPtr, SrcOffset, NumBytes); } #endif } } /// <summary>To be documented.</summary> public readonly unsafe void CopyBufferRegion(ref ID3D12Resource pDstBuffer, ulong DstOffset, ID3D12Resource* pSrcBuffer, ulong SrcOffset, ulong NumBytes) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12Resource* pDstBufferPtr = &pDstBuffer) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12Resource*, ulong, ID3D12Resource*, ulong, ulong, void>)LpVtbl[15])(@this, pDstBufferPtr, DstOffset, pSrcBuffer, SrcOffset, NumBytes); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12Resource*, ulong, ID3D12Resource*, ulong, ulong, void>)LpVtbl[15])(@this, pDstBufferPtr, DstOffset, pSrcBuffer, SrcOffset, NumBytes); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12Resource*, ulong, ID3D12Resource*, ulong, ulong, void>)LpVtbl[15])(@this, pDstBufferPtr, DstOffset, pSrcBuffer, SrcOffset, NumBytes); } #endif } } /// <summary>To be documented.</summary> public readonly void CopyBufferRegion(ref ID3D12Resource pDstBuffer, ulong DstOffset, ref ID3D12Resource pSrcBuffer, ulong SrcOffset, ulong NumBytes) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12Resource* pDstBufferPtr = &pDstBuffer) { fixed (ID3D12Resource* pSrcBufferPtr = &pSrcBuffer) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12Resource*, ulong, ID3D12Resource*, ulong, ulong, void>)LpVtbl[15])(@this, pDstBufferPtr, DstOffset, pSrcBufferPtr, SrcOffset, NumBytes); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12Resource*, ulong, ID3D12Resource*, ulong, ulong, void>)LpVtbl[15])(@this, pDstBufferPtr, DstOffset, pSrcBufferPtr, SrcOffset, NumBytes); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12Resource*, ulong, ID3D12Resource*, ulong, ulong, void>)LpVtbl[15])(@this, pDstBufferPtr, DstOffset, pSrcBufferPtr, SrcOffset, NumBytes); } #endif } } } /// <summary>To be documented.</summary> public readonly unsafe void CopyTextureRegion(TextureCopyLocation* pDst, uint DstX, uint DstY, uint DstZ, TextureCopyLocation* pSrc, Box* pSrcBox) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, TextureCopyLocation*, uint, uint, uint, TextureCopyLocation*, Box*, void>)LpVtbl[16])(@this, pDst, DstX, DstY, DstZ, pSrc, pSrcBox); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, TextureCopyLocation*, uint, uint, uint, TextureCopyLocation*, Box*, void>)LpVtbl[16])(@this, pDst, DstX, DstY, DstZ, pSrc, pSrcBox); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, TextureCopyLocation*, uint, uint, uint, TextureCopyLocation*, Box*, void>)LpVtbl[16])(@this, pDst, DstX, DstY, DstZ, pSrc, pSrcBox); } #endif } /// <summary>To be documented.</summary> public readonly unsafe void CopyTextureRegion(TextureCopyLocation* pDst, uint DstX, uint DstY, uint DstZ, TextureCopyLocation* pSrc, ref Box pSrcBox) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (Box* pSrcBoxPtr = &pSrcBox) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, TextureCopyLocation*, uint, uint, uint, TextureCopyLocation*, Box*, void>)LpVtbl[16])(@this, pDst, DstX, DstY, DstZ, pSrc, pSrcBoxPtr); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, TextureCopyLocation*, uint, uint, uint, TextureCopyLocation*, Box*, void>)LpVtbl[16])(@this, pDst, DstX, DstY, DstZ, pSrc, pSrcBoxPtr); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, TextureCopyLocation*, uint, uint, uint, TextureCopyLocation*, Box*, void>)LpVtbl[16])(@this, pDst, DstX, DstY, DstZ, pSrc, pSrcBoxPtr); } #endif } } /// <summary>To be documented.</summary> public readonly unsafe void CopyTextureRegion(TextureCopyLocation* pDst, uint DstX, uint DstY, uint DstZ, ref TextureCopyLocation pSrc, Box* pSrcBox) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (TextureCopyLocation* pSrcPtr = &pSrc) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, TextureCopyLocation*, uint, uint, uint, TextureCopyLocation*, Box*, void>)LpVtbl[16])(@this, pDst, DstX, DstY, DstZ, pSrcPtr, pSrcBox); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, TextureCopyLocation*, uint, uint, uint, TextureCopyLocation*, Box*, void>)LpVtbl[16])(@this, pDst, DstX, DstY, DstZ, pSrcPtr, pSrcBox); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, TextureCopyLocation*, uint, uint, uint, TextureCopyLocation*, Box*, void>)LpVtbl[16])(@this, pDst, DstX, DstY, DstZ, pSrcPtr, pSrcBox); } #endif } } /// <summary>To be documented.</summary> public readonly unsafe void CopyTextureRegion(TextureCopyLocation* pDst, uint DstX, uint DstY, uint DstZ, ref TextureCopyLocation pSrc, ref Box pSrcBox) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (TextureCopyLocation* pSrcPtr = &pSrc) { fixed (Box* pSrcBoxPtr = &pSrcBox) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, TextureCopyLocation*, uint, uint, uint, TextureCopyLocation*, Box*, void>)LpVtbl[16])(@this, pDst, DstX, DstY, DstZ, pSrcPtr, pSrcBoxPtr); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, TextureCopyLocation*, uint, uint, uint, TextureCopyLocation*, Box*, void>)LpVtbl[16])(@this, pDst, DstX, DstY, DstZ, pSrcPtr, pSrcBoxPtr); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, TextureCopyLocation*, uint, uint, uint, TextureCopyLocation*, Box*, void>)LpVtbl[16])(@this, pDst, DstX, DstY, DstZ, pSrcPtr, pSrcBoxPtr); } #endif } } } /// <summary>To be documented.</summary> public readonly unsafe void CopyTextureRegion(ref TextureCopyLocation pDst, uint DstX, uint DstY, uint DstZ, TextureCopyLocation* pSrc, Box* pSrcBox) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (TextureCopyLocation* pDstPtr = &pDst) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, TextureCopyLocation*, uint, uint, uint, TextureCopyLocation*, Box*, void>)LpVtbl[16])(@this, pDstPtr, DstX, DstY, DstZ, pSrc, pSrcBox); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, TextureCopyLocation*, uint, uint, uint, TextureCopyLocation*, Box*, void>)LpVtbl[16])(@this, pDstPtr, DstX, DstY, DstZ, pSrc, pSrcBox); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, TextureCopyLocation*, uint, uint, uint, TextureCopyLocation*, Box*, void>)LpVtbl[16])(@this, pDstPtr, DstX, DstY, DstZ, pSrc, pSrcBox); } #endif } } /// <summary>To be documented.</summary> public readonly unsafe void CopyTextureRegion(ref TextureCopyLocation pDst, uint DstX, uint DstY, uint DstZ, TextureCopyLocation* pSrc, ref Box pSrcBox) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (TextureCopyLocation* pDstPtr = &pDst) { fixed (Box* pSrcBoxPtr = &pSrcBox) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, TextureCopyLocation*, uint, uint, uint, TextureCopyLocation*, Box*, void>)LpVtbl[16])(@this, pDstPtr, DstX, DstY, DstZ, pSrc, pSrcBoxPtr); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, TextureCopyLocation*, uint, uint, uint, TextureCopyLocation*, Box*, void>)LpVtbl[16])(@this, pDstPtr, DstX, DstY, DstZ, pSrc, pSrcBoxPtr); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, TextureCopyLocation*, uint, uint, uint, TextureCopyLocation*, Box*, void>)LpVtbl[16])(@this, pDstPtr, DstX, DstY, DstZ, pSrc, pSrcBoxPtr); } #endif } } } /// <summary>To be documented.</summary> public readonly unsafe void CopyTextureRegion(ref TextureCopyLocation pDst, uint DstX, uint DstY, uint DstZ, ref TextureCopyLocation pSrc, Box* pSrcBox) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (TextureCopyLocation* pDstPtr = &pDst) { fixed (TextureCopyLocation* pSrcPtr = &pSrc) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, TextureCopyLocation*, uint, uint, uint, TextureCopyLocation*, Box*, void>)LpVtbl[16])(@this, pDstPtr, DstX, DstY, DstZ, pSrcPtr, pSrcBox); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, TextureCopyLocation*, uint, uint, uint, TextureCopyLocation*, Box*, void>)LpVtbl[16])(@this, pDstPtr, DstX, DstY, DstZ, pSrcPtr, pSrcBox); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, TextureCopyLocation*, uint, uint, uint, TextureCopyLocation*, Box*, void>)LpVtbl[16])(@this, pDstPtr, DstX, DstY, DstZ, pSrcPtr, pSrcBox); } #endif } } } /// <summary>To be documented.</summary> public readonly void CopyTextureRegion(ref TextureCopyLocation pDst, uint DstX, uint DstY, uint DstZ, ref TextureCopyLocation pSrc, ref Box pSrcBox) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (TextureCopyLocation* pDstPtr = &pDst) { fixed (TextureCopyLocation* pSrcPtr = &pSrc) { fixed (Box* pSrcBoxPtr = &pSrcBox) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, TextureCopyLocation*, uint, uint, uint, TextureCopyLocation*, Box*, void>)LpVtbl[16])(@this, pDstPtr, DstX, DstY, DstZ, pSrcPtr, pSrcBoxPtr); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, TextureCopyLocation*, uint, uint, uint, TextureCopyLocation*, Box*, void>)LpVtbl[16])(@this, pDstPtr, DstX, DstY, DstZ, pSrcPtr, pSrcBoxPtr); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, TextureCopyLocation*, uint, uint, uint, TextureCopyLocation*, Box*, void>)LpVtbl[16])(@this, pDstPtr, DstX, DstY, DstZ, pSrcPtr, pSrcBoxPtr); } #endif } } } } /// <summary>To be documented.</summary> public readonly unsafe void CopyResource(ID3D12Resource* pDstResource, ID3D12Resource* pSrcResource) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12Resource*, ID3D12Resource*, void>)LpVtbl[17])(@this, pDstResource, pSrcResource); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12Resource*, ID3D12Resource*, void>)LpVtbl[17])(@this, pDstResource, pSrcResource); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12Resource*, ID3D12Resource*, void>)LpVtbl[17])(@this, pDstResource, pSrcResource); } #endif } /// <summary>To be documented.</summary> public readonly unsafe void CopyResource(ID3D12Resource* pDstResource, ref ID3D12Resource pSrcResource) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12Resource* pSrcResourcePtr = &pSrcResource) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12Resource*, ID3D12Resource*, void>)LpVtbl[17])(@this, pDstResource, pSrcResourcePtr); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12Resource*, ID3D12Resource*, void>)LpVtbl[17])(@this, pDstResource, pSrcResourcePtr); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12Resource*, ID3D12Resource*, void>)LpVtbl[17])(@this, pDstResource, pSrcResourcePtr); } #endif } } /// <summary>To be documented.</summary> public readonly unsafe void CopyResource(ref ID3D12Resource pDstResource, ID3D12Resource* pSrcResource) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12Resource* pDstResourcePtr = &pDstResource) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12Resource*, ID3D12Resource*, void>)LpVtbl[17])(@this, pDstResourcePtr, pSrcResource); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12Resource*, ID3D12Resource*, void>)LpVtbl[17])(@this, pDstResourcePtr, pSrcResource); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12Resource*, ID3D12Resource*, void>)LpVtbl[17])(@this, pDstResourcePtr, pSrcResource); } #endif } } /// <summary>To be documented.</summary> public readonly void CopyResource(ref ID3D12Resource pDstResource, ref ID3D12Resource pSrcResource) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12Resource* pDstResourcePtr = &pDstResource) { fixed (ID3D12Resource* pSrcResourcePtr = &pSrcResource) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12Resource*, ID3D12Resource*, void>)LpVtbl[17])(@this, pDstResourcePtr, pSrcResourcePtr); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12Resource*, ID3D12Resource*, void>)LpVtbl[17])(@this, pDstResourcePtr, pSrcResourcePtr); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12Resource*, ID3D12Resource*, void>)LpVtbl[17])(@this, pDstResourcePtr, pSrcResourcePtr); } #endif } } } /// <summary>To be documented.</summary> public readonly unsafe void CopyTiles(ID3D12Resource* pTiledResource, TiledResourceCoordinate* pTileRegionStartCoordinate, TileRegionSize* pTileRegionSize, ID3D12Resource* pBuffer, ulong BufferStartOffsetInBytes, TileCopyFlags Flags) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResource, pTileRegionStartCoordinate, pTileRegionSize, pBuffer, BufferStartOffsetInBytes, Flags); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResource, pTileRegionStartCoordinate, pTileRegionSize, pBuffer, BufferStartOffsetInBytes, Flags); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResource, pTileRegionStartCoordinate, pTileRegionSize, pBuffer, BufferStartOffsetInBytes, Flags); } #endif } /// <summary>To be documented.</summary> public readonly unsafe void CopyTiles(ID3D12Resource* pTiledResource, TiledResourceCoordinate* pTileRegionStartCoordinate, TileRegionSize* pTileRegionSize, ref ID3D12Resource pBuffer, ulong BufferStartOffsetInBytes, TileCopyFlags Flags) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12Resource* pBufferPtr = &pBuffer) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResource, pTileRegionStartCoordinate, pTileRegionSize, pBufferPtr, BufferStartOffsetInBytes, Flags); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResource, pTileRegionStartCoordinate, pTileRegionSize, pBufferPtr, BufferStartOffsetInBytes, Flags); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResource, pTileRegionStartCoordinate, pTileRegionSize, pBufferPtr, BufferStartOffsetInBytes, Flags); } #endif } } /// <summary>To be documented.</summary> public readonly unsafe void CopyTiles(ID3D12Resource* pTiledResource, TiledResourceCoordinate* pTileRegionStartCoordinate, ref TileRegionSize pTileRegionSize, ID3D12Resource* pBuffer, ulong BufferStartOffsetInBytes, TileCopyFlags Flags) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (TileRegionSize* pTileRegionSizePtr = &pTileRegionSize) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResource, pTileRegionStartCoordinate, pTileRegionSizePtr, pBuffer, BufferStartOffsetInBytes, Flags); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResource, pTileRegionStartCoordinate, pTileRegionSizePtr, pBuffer, BufferStartOffsetInBytes, Flags); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResource, pTileRegionStartCoordinate, pTileRegionSizePtr, pBuffer, BufferStartOffsetInBytes, Flags); } #endif } } /// <summary>To be documented.</summary> public readonly unsafe void CopyTiles(ID3D12Resource* pTiledResource, TiledResourceCoordinate* pTileRegionStartCoordinate, ref TileRegionSize pTileRegionSize, ref ID3D12Resource pBuffer, ulong BufferStartOffsetInBytes, TileCopyFlags Flags) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (TileRegionSize* pTileRegionSizePtr = &pTileRegionSize) { fixed (ID3D12Resource* pBufferPtr = &pBuffer) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResource, pTileRegionStartCoordinate, pTileRegionSizePtr, pBufferPtr, BufferStartOffsetInBytes, Flags); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResource, pTileRegionStartCoordinate, pTileRegionSizePtr, pBufferPtr, BufferStartOffsetInBytes, Flags); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResource, pTileRegionStartCoordinate, pTileRegionSizePtr, pBufferPtr, BufferStartOffsetInBytes, Flags); } #endif } } } /// <summary>To be documented.</summary> public readonly unsafe void CopyTiles(ID3D12Resource* pTiledResource, ref TiledResourceCoordinate pTileRegionStartCoordinate, TileRegionSize* pTileRegionSize, ID3D12Resource* pBuffer, ulong BufferStartOffsetInBytes, TileCopyFlags Flags) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (TiledResourceCoordinate* pTileRegionStartCoordinatePtr = &pTileRegionStartCoordinate) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResource, pTileRegionStartCoordinatePtr, pTileRegionSize, pBuffer, BufferStartOffsetInBytes, Flags); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResource, pTileRegionStartCoordinatePtr, pTileRegionSize, pBuffer, BufferStartOffsetInBytes, Flags); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResource, pTileRegionStartCoordinatePtr, pTileRegionSize, pBuffer, BufferStartOffsetInBytes, Flags); } #endif } } /// <summary>To be documented.</summary> public readonly unsafe void CopyTiles(ID3D12Resource* pTiledResource, ref TiledResourceCoordinate pTileRegionStartCoordinate, TileRegionSize* pTileRegionSize, ref ID3D12Resource pBuffer, ulong BufferStartOffsetInBytes, TileCopyFlags Flags) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (TiledResourceCoordinate* pTileRegionStartCoordinatePtr = &pTileRegionStartCoordinate) { fixed (ID3D12Resource* pBufferPtr = &pBuffer) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResource, pTileRegionStartCoordinatePtr, pTileRegionSize, pBufferPtr, BufferStartOffsetInBytes, Flags); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResource, pTileRegionStartCoordinatePtr, pTileRegionSize, pBufferPtr, BufferStartOffsetInBytes, Flags); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResource, pTileRegionStartCoordinatePtr, pTileRegionSize, pBufferPtr, BufferStartOffsetInBytes, Flags); } #endif } } } /// <summary>To be documented.</summary> public readonly unsafe void CopyTiles(ID3D12Resource* pTiledResource, ref TiledResourceCoordinate pTileRegionStartCoordinate, ref TileRegionSize pTileRegionSize, ID3D12Resource* pBuffer, ulong BufferStartOffsetInBytes, TileCopyFlags Flags) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (TiledResourceCoordinate* pTileRegionStartCoordinatePtr = &pTileRegionStartCoordinate) { fixed (TileRegionSize* pTileRegionSizePtr = &pTileRegionSize) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResource, pTileRegionStartCoordinatePtr, pTileRegionSizePtr, pBuffer, BufferStartOffsetInBytes, Flags); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResource, pTileRegionStartCoordinatePtr, pTileRegionSizePtr, pBuffer, BufferStartOffsetInBytes, Flags); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResource, pTileRegionStartCoordinatePtr, pTileRegionSizePtr, pBuffer, BufferStartOffsetInBytes, Flags); } #endif } } } /// <summary>To be documented.</summary> public readonly unsafe void CopyTiles(ID3D12Resource* pTiledResource, ref TiledResourceCoordinate pTileRegionStartCoordinate, ref TileRegionSize pTileRegionSize, ref ID3D12Resource pBuffer, ulong BufferStartOffsetInBytes, TileCopyFlags Flags) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (TiledResourceCoordinate* pTileRegionStartCoordinatePtr = &pTileRegionStartCoordinate) { fixed (TileRegionSize* pTileRegionSizePtr = &pTileRegionSize) { fixed (ID3D12Resource* pBufferPtr = &pBuffer) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResource, pTileRegionStartCoordinatePtr, pTileRegionSizePtr, pBufferPtr, BufferStartOffsetInBytes, Flags); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResource, pTileRegionStartCoordinatePtr, pTileRegionSizePtr, pBufferPtr, BufferStartOffsetInBytes, Flags); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResource, pTileRegionStartCoordinatePtr, pTileRegionSizePtr, pBufferPtr, BufferStartOffsetInBytes, Flags); } #endif } } } } /// <summary>To be documented.</summary> public readonly unsafe void CopyTiles(ref ID3D12Resource pTiledResource, TiledResourceCoordinate* pTileRegionStartCoordinate, TileRegionSize* pTileRegionSize, ID3D12Resource* pBuffer, ulong BufferStartOffsetInBytes, TileCopyFlags Flags) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12Resource* pTiledResourcePtr = &pTiledResource) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResourcePtr, pTileRegionStartCoordinate, pTileRegionSize, pBuffer, BufferStartOffsetInBytes, Flags); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResourcePtr, pTileRegionStartCoordinate, pTileRegionSize, pBuffer, BufferStartOffsetInBytes, Flags); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResourcePtr, pTileRegionStartCoordinate, pTileRegionSize, pBuffer, BufferStartOffsetInBytes, Flags); } #endif } } /// <summary>To be documented.</summary> public readonly unsafe void CopyTiles(ref ID3D12Resource pTiledResource, TiledResourceCoordinate* pTileRegionStartCoordinate, TileRegionSize* pTileRegionSize, ref ID3D12Resource pBuffer, ulong BufferStartOffsetInBytes, TileCopyFlags Flags) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12Resource* pTiledResourcePtr = &pTiledResource) { fixed (ID3D12Resource* pBufferPtr = &pBuffer) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResourcePtr, pTileRegionStartCoordinate, pTileRegionSize, pBufferPtr, BufferStartOffsetInBytes, Flags); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResourcePtr, pTileRegionStartCoordinate, pTileRegionSize, pBufferPtr, BufferStartOffsetInBytes, Flags); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResourcePtr, pTileRegionStartCoordinate, pTileRegionSize, pBufferPtr, BufferStartOffsetInBytes, Flags); } #endif } } } /// <summary>To be documented.</summary> public readonly unsafe void CopyTiles(ref ID3D12Resource pTiledResource, TiledResourceCoordinate* pTileRegionStartCoordinate, ref TileRegionSize pTileRegionSize, ID3D12Resource* pBuffer, ulong BufferStartOffsetInBytes, TileCopyFlags Flags) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12Resource* pTiledResourcePtr = &pTiledResource) { fixed (TileRegionSize* pTileRegionSizePtr = &pTileRegionSize) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResourcePtr, pTileRegionStartCoordinate, pTileRegionSizePtr, pBuffer, BufferStartOffsetInBytes, Flags); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResourcePtr, pTileRegionStartCoordinate, pTileRegionSizePtr, pBuffer, BufferStartOffsetInBytes, Flags); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResourcePtr, pTileRegionStartCoordinate, pTileRegionSizePtr, pBuffer, BufferStartOffsetInBytes, Flags); } #endif } } } /// <summary>To be documented.</summary> public readonly unsafe void CopyTiles(ref ID3D12Resource pTiledResource, TiledResourceCoordinate* pTileRegionStartCoordinate, ref TileRegionSize pTileRegionSize, ref ID3D12Resource pBuffer, ulong BufferStartOffsetInBytes, TileCopyFlags Flags) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12Resource* pTiledResourcePtr = &pTiledResource) { fixed (TileRegionSize* pTileRegionSizePtr = &pTileRegionSize) { fixed (ID3D12Resource* pBufferPtr = &pBuffer) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResourcePtr, pTileRegionStartCoordinate, pTileRegionSizePtr, pBufferPtr, BufferStartOffsetInBytes, Flags); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResourcePtr, pTileRegionStartCoordinate, pTileRegionSizePtr, pBufferPtr, BufferStartOffsetInBytes, Flags); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResourcePtr, pTileRegionStartCoordinate, pTileRegionSizePtr, pBufferPtr, BufferStartOffsetInBytes, Flags); } #endif } } } } /// <summary>To be documented.</summary> public readonly unsafe void CopyTiles(ref ID3D12Resource pTiledResource, ref TiledResourceCoordinate pTileRegionStartCoordinate, TileRegionSize* pTileRegionSize, ID3D12Resource* pBuffer, ulong BufferStartOffsetInBytes, TileCopyFlags Flags) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12Resource* pTiledResourcePtr = &pTiledResource) { fixed (TiledResourceCoordinate* pTileRegionStartCoordinatePtr = &pTileRegionStartCoordinate) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResourcePtr, pTileRegionStartCoordinatePtr, pTileRegionSize, pBuffer, BufferStartOffsetInBytes, Flags); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResourcePtr, pTileRegionStartCoordinatePtr, pTileRegionSize, pBuffer, BufferStartOffsetInBytes, Flags); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResourcePtr, pTileRegionStartCoordinatePtr, pTileRegionSize, pBuffer, BufferStartOffsetInBytes, Flags); } #endif } } } /// <summary>To be documented.</summary> public readonly unsafe void CopyTiles(ref ID3D12Resource pTiledResource, ref TiledResourceCoordinate pTileRegionStartCoordinate, TileRegionSize* pTileRegionSize, ref ID3D12Resource pBuffer, ulong BufferStartOffsetInBytes, TileCopyFlags Flags) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12Resource* pTiledResourcePtr = &pTiledResource) { fixed (TiledResourceCoordinate* pTileRegionStartCoordinatePtr = &pTileRegionStartCoordinate) { fixed (ID3D12Resource* pBufferPtr = &pBuffer) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResourcePtr, pTileRegionStartCoordinatePtr, pTileRegionSize, pBufferPtr, BufferStartOffsetInBytes, Flags); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResourcePtr, pTileRegionStartCoordinatePtr, pTileRegionSize, pBufferPtr, BufferStartOffsetInBytes, Flags); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResourcePtr, pTileRegionStartCoordinatePtr, pTileRegionSize, pBufferPtr, BufferStartOffsetInBytes, Flags); } #endif } } } } /// <summary>To be documented.</summary> public readonly unsafe void CopyTiles(ref ID3D12Resource pTiledResource, ref TiledResourceCoordinate pTileRegionStartCoordinate, ref TileRegionSize pTileRegionSize, ID3D12Resource* pBuffer, ulong BufferStartOffsetInBytes, TileCopyFlags Flags) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12Resource* pTiledResourcePtr = &pTiledResource) { fixed (TiledResourceCoordinate* pTileRegionStartCoordinatePtr = &pTileRegionStartCoordinate) { fixed (TileRegionSize* pTileRegionSizePtr = &pTileRegionSize) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResourcePtr, pTileRegionStartCoordinatePtr, pTileRegionSizePtr, pBuffer, BufferStartOffsetInBytes, Flags); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResourcePtr, pTileRegionStartCoordinatePtr, pTileRegionSizePtr, pBuffer, BufferStartOffsetInBytes, Flags); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResourcePtr, pTileRegionStartCoordinatePtr, pTileRegionSizePtr, pBuffer, BufferStartOffsetInBytes, Flags); } #endif } } } } /// <summary>To be documented.</summary> public readonly void CopyTiles(ref ID3D12Resource pTiledResource, ref TiledResourceCoordinate pTileRegionStartCoordinate, ref TileRegionSize pTileRegionSize, ref ID3D12Resource pBuffer, ulong BufferStartOffsetInBytes, TileCopyFlags Flags) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12Resource* pTiledResourcePtr = &pTiledResource) { fixed (TiledResourceCoordinate* pTileRegionStartCoordinatePtr = &pTileRegionStartCoordinate) { fixed (TileRegionSize* pTileRegionSizePtr = &pTileRegionSize) { fixed (ID3D12Resource* pBufferPtr = &pBuffer) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResourcePtr, pTileRegionStartCoordinatePtr, pTileRegionSizePtr, pBufferPtr, BufferStartOffsetInBytes, Flags); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResourcePtr, pTileRegionStartCoordinatePtr, pTileRegionSizePtr, pBufferPtr, BufferStartOffsetInBytes, Flags); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12Resource*, TiledResourceCoordinate*, TileRegionSize*, ID3D12Resource*, ulong, TileCopyFlags, void>)LpVtbl[18])(@this, pTiledResourcePtr, pTileRegionStartCoordinatePtr, pTileRegionSizePtr, pBufferPtr, BufferStartOffsetInBytes, Flags); } #endif } } } } } /// <summary>To be documented.</summary> public readonly unsafe void ResolveSubresource(ID3D12Resource* pDstResource, uint DstSubresource, ID3D12Resource* pSrcResource, uint SrcSubresource, Silk.NET.DXGI.Format Format) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12Resource*, uint, ID3D12Resource*, uint, Silk.NET.DXGI.Format, void>)LpVtbl[19])(@this, pDstResource, DstSubresource, pSrcResource, SrcSubresource, Format); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12Resource*, uint, ID3D12Resource*, uint, Silk.NET.DXGI.Format, void>)LpVtbl[19])(@this, pDstResource, DstSubresource, pSrcResource, SrcSubresource, Format); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12Resource*, uint, ID3D12Resource*, uint, Silk.NET.DXGI.Format, void>)LpVtbl[19])(@this, pDstResource, DstSubresource, pSrcResource, SrcSubresource, Format); } #endif } /// <summary>To be documented.</summary> public readonly unsafe void ResolveSubresource(ID3D12Resource* pDstResource, uint DstSubresource, ref ID3D12Resource pSrcResource, uint SrcSubresource, Silk.NET.DXGI.Format Format) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12Resource* pSrcResourcePtr = &pSrcResource) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12Resource*, uint, ID3D12Resource*, uint, Silk.NET.DXGI.Format, void>)LpVtbl[19])(@this, pDstResource, DstSubresource, pSrcResourcePtr, SrcSubresource, Format); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12Resource*, uint, ID3D12Resource*, uint, Silk.NET.DXGI.Format, void>)LpVtbl[19])(@this, pDstResource, DstSubresource, pSrcResourcePtr, SrcSubresource, Format); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12Resource*, uint, ID3D12Resource*, uint, Silk.NET.DXGI.Format, void>)LpVtbl[19])(@this, pDstResource, DstSubresource, pSrcResourcePtr, SrcSubresource, Format); } #endif } } /// <summary>To be documented.</summary> public readonly unsafe void ResolveSubresource(ref ID3D12Resource pDstResource, uint DstSubresource, ID3D12Resource* pSrcResource, uint SrcSubresource, Silk.NET.DXGI.Format Format) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12Resource* pDstResourcePtr = &pDstResource) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12Resource*, uint, ID3D12Resource*, uint, Silk.NET.DXGI.Format, void>)LpVtbl[19])(@this, pDstResourcePtr, DstSubresource, pSrcResource, SrcSubresource, Format); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12Resource*, uint, ID3D12Resource*, uint, Silk.NET.DXGI.Format, void>)LpVtbl[19])(@this, pDstResourcePtr, DstSubresource, pSrcResource, SrcSubresource, Format); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12Resource*, uint, ID3D12Resource*, uint, Silk.NET.DXGI.Format, void>)LpVtbl[19])(@this, pDstResourcePtr, DstSubresource, pSrcResource, SrcSubresource, Format); } #endif } } /// <summary>To be documented.</summary> public readonly void ResolveSubresource(ref ID3D12Resource pDstResource, uint DstSubresource, ref ID3D12Resource pSrcResource, uint SrcSubresource, Silk.NET.DXGI.Format Format) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12Resource* pDstResourcePtr = &pDstResource) { fixed (ID3D12Resource* pSrcResourcePtr = &pSrcResource) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12Resource*, uint, ID3D12Resource*, uint, Silk.NET.DXGI.Format, void>)LpVtbl[19])(@this, pDstResourcePtr, DstSubresource, pSrcResourcePtr, SrcSubresource, Format); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12Resource*, uint, ID3D12Resource*, uint, Silk.NET.DXGI.Format, void>)LpVtbl[19])(@this, pDstResourcePtr, DstSubresource, pSrcResourcePtr, SrcSubresource, Format); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12Resource*, uint, ID3D12Resource*, uint, Silk.NET.DXGI.Format, void>)LpVtbl[19])(@this, pDstResourcePtr, DstSubresource, pSrcResourcePtr, SrcSubresource, Format); } #endif } } } /// <summary>To be documented.</summary> public readonly void IASetPrimitiveTopology(Silk.NET.Core.Native.D3DPrimitiveTopology PrimitiveTopology) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, Silk.NET.Core.Native.D3DPrimitiveTopology, void>)LpVtbl[20])(@this, PrimitiveTopology); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, Silk.NET.Core.Native.D3DPrimitiveTopology, void>)LpVtbl[20])(@this, PrimitiveTopology); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, Silk.NET.Core.Native.D3DPrimitiveTopology, void>)LpVtbl[20])(@this, PrimitiveTopology); } #endif } /// <summary>To be documented.</summary> public readonly unsafe void RSSetViewports(uint NumViewports, Viewport* pViewports) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, uint, Viewport*, void>)LpVtbl[21])(@this, NumViewports, pViewports); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, uint, Viewport*, void>)LpVtbl[21])(@this, NumViewports, pViewports); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, uint, Viewport*, void>)LpVtbl[21])(@this, NumViewports, pViewports); } #endif } /// <summary>To be documented.</summary> public readonly void RSSetViewports(uint NumViewports, ref Viewport pViewports) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (Viewport* pViewportsPtr = &pViewports) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, uint, Viewport*, void>)LpVtbl[21])(@this, NumViewports, pViewportsPtr); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, uint, Viewport*, void>)LpVtbl[21])(@this, NumViewports, pViewportsPtr); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, uint, Viewport*, void>)LpVtbl[21])(@this, NumViewports, pViewportsPtr); } #endif } } /// <summary>To be documented.</summary> public readonly unsafe void RSSetScissorRects(uint NumRects, Silk.NET.Maths.Rectangle<int>* pRects) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[22])(@this, NumRects, pRects); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[22])(@this, NumRects, pRects); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[22])(@this, NumRects, pRects); } #endif } /// <summary>To be documented.</summary> public readonly void RSSetScissorRects(uint NumRects, ref Silk.NET.Maths.Rectangle<int> pRects) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (Silk.NET.Maths.Rectangle<int>* pRectsPtr = &pRects) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[22])(@this, NumRects, pRectsPtr); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[22])(@this, NumRects, pRectsPtr); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[22])(@this, NumRects, pRectsPtr); } #endif } } /// <summary>To be documented.</summary> public readonly unsafe void OMSetBlendFactor([Count(Count = 4)] float* BlendFactor) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, float*, void>)LpVtbl[23])(@this, BlendFactor); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, float*, void>)LpVtbl[23])(@this, BlendFactor); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, float*, void>)LpVtbl[23])(@this, BlendFactor); } #endif } /// <summary>To be documented.</summary> public readonly void OMSetBlendFactor([Count(Count = 4)] ref float BlendFactor) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (float* BlendFactorPtr = &BlendFactor) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, float*, void>)LpVtbl[23])(@this, BlendFactorPtr); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, float*, void>)LpVtbl[23])(@this, BlendFactorPtr); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, float*, void>)LpVtbl[23])(@this, BlendFactorPtr); } #endif } } /// <summary>To be documented.</summary> public readonly void OMSetStencilRef(uint StencilRef) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, uint, void>)LpVtbl[24])(@this, StencilRef); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, uint, void>)LpVtbl[24])(@this, StencilRef); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, uint, void>)LpVtbl[24])(@this, StencilRef); } #endif } /// <summary>To be documented.</summary> public readonly unsafe void SetPipelineState(ID3D12PipelineState* pPipelineState) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12PipelineState*, void>)LpVtbl[25])(@this, pPipelineState); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12PipelineState*, void>)LpVtbl[25])(@this, pPipelineState); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12PipelineState*, void>)LpVtbl[25])(@this, pPipelineState); } #endif } /// <summary>To be documented.</summary> public readonly void SetPipelineState(ref ID3D12PipelineState pPipelineState) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12PipelineState* pPipelineStatePtr = &pPipelineState) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12PipelineState*, void>)LpVtbl[25])(@this, pPipelineStatePtr); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12PipelineState*, void>)LpVtbl[25])(@this, pPipelineStatePtr); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12PipelineState*, void>)LpVtbl[25])(@this, pPipelineStatePtr); } #endif } } /// <summary>To be documented.</summary> public readonly unsafe void ResourceBarrier(uint NumBarriers, ResourceBarrier* pBarriers) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, uint, ResourceBarrier*, void>)LpVtbl[26])(@this, NumBarriers, pBarriers); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, uint, ResourceBarrier*, void>)LpVtbl[26])(@this, NumBarriers, pBarriers); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, uint, ResourceBarrier*, void>)LpVtbl[26])(@this, NumBarriers, pBarriers); } #endif } /// <summary>To be documented.</summary> public readonly void ResourceBarrier(uint NumBarriers, ref ResourceBarrier pBarriers) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ResourceBarrier* pBarriersPtr = &pBarriers) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, uint, ResourceBarrier*, void>)LpVtbl[26])(@this, NumBarriers, pBarriersPtr); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, uint, ResourceBarrier*, void>)LpVtbl[26])(@this, NumBarriers, pBarriersPtr); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, uint, ResourceBarrier*, void>)LpVtbl[26])(@this, NumBarriers, pBarriersPtr); } #endif } } /// <summary>To be documented.</summary> public readonly unsafe void ExecuteBundle(ID3D12GraphicsCommandList* pCommandList) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12GraphicsCommandList*, void>)LpVtbl[27])(@this, pCommandList); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12GraphicsCommandList*, void>)LpVtbl[27])(@this, pCommandList); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12GraphicsCommandList*, void>)LpVtbl[27])(@this, pCommandList); } #endif } /// <summary>To be documented.</summary> public readonly void ExecuteBundle(ref ID3D12GraphicsCommandList pCommandList) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12GraphicsCommandList* pCommandListPtr = &pCommandList) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12GraphicsCommandList*, void>)LpVtbl[27])(@this, pCommandListPtr); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12GraphicsCommandList*, void>)LpVtbl[27])(@this, pCommandListPtr); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12GraphicsCommandList*, void>)LpVtbl[27])(@this, pCommandListPtr); } #endif } } /// <summary>To be documented.</summary> public readonly unsafe void SetDescriptorHeaps(uint NumDescriptorHeaps, ID3D12DescriptorHeap** ppDescriptorHeaps) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, uint, ID3D12DescriptorHeap**, void>)LpVtbl[28])(@this, NumDescriptorHeaps, ppDescriptorHeaps); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, uint, ID3D12DescriptorHeap**, void>)LpVtbl[28])(@this, NumDescriptorHeaps, ppDescriptorHeaps); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, uint, ID3D12DescriptorHeap**, void>)LpVtbl[28])(@this, NumDescriptorHeaps, ppDescriptorHeaps); } #endif } /// <summary>To be documented.</summary> public readonly unsafe void SetDescriptorHeaps(uint NumDescriptorHeaps, ref ID3D12DescriptorHeap* ppDescriptorHeaps) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12DescriptorHeap** ppDescriptorHeapsPtr = &ppDescriptorHeaps) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, uint, ID3D12DescriptorHeap**, void>)LpVtbl[28])(@this, NumDescriptorHeaps, ppDescriptorHeapsPtr); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, uint, ID3D12DescriptorHeap**, void>)LpVtbl[28])(@this, NumDescriptorHeaps, ppDescriptorHeapsPtr); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, uint, ID3D12DescriptorHeap**, void>)LpVtbl[28])(@this, NumDescriptorHeaps, ppDescriptorHeapsPtr); } #endif } } /// <summary>To be documented.</summary> public readonly unsafe void SetComputeRootSignature(ID3D12RootSignature* pRootSignature) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12RootSignature*, void>)LpVtbl[29])(@this, pRootSignature); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12RootSignature*, void>)LpVtbl[29])(@this, pRootSignature); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12RootSignature*, void>)LpVtbl[29])(@this, pRootSignature); } #endif } /// <summary>To be documented.</summary> public readonly void SetComputeRootSignature(ref ID3D12RootSignature pRootSignature) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12RootSignature* pRootSignaturePtr = &pRootSignature) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12RootSignature*, void>)LpVtbl[29])(@this, pRootSignaturePtr); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12RootSignature*, void>)LpVtbl[29])(@this, pRootSignaturePtr); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12RootSignature*, void>)LpVtbl[29])(@this, pRootSignaturePtr); } #endif } } /// <summary>To be documented.</summary> public readonly unsafe void SetGraphicsRootSignature(ID3D12RootSignature* pRootSignature) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12RootSignature*, void>)LpVtbl[30])(@this, pRootSignature); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12RootSignature*, void>)LpVtbl[30])(@this, pRootSignature); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12RootSignature*, void>)LpVtbl[30])(@this, pRootSignature); } #endif } /// <summary>To be documented.</summary> public readonly void SetGraphicsRootSignature(ref ID3D12RootSignature pRootSignature) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12RootSignature* pRootSignaturePtr = &pRootSignature) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12RootSignature*, void>)LpVtbl[30])(@this, pRootSignaturePtr); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12RootSignature*, void>)LpVtbl[30])(@this, pRootSignaturePtr); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12RootSignature*, void>)LpVtbl[30])(@this, pRootSignaturePtr); } #endif } } /// <summary>To be documented.</summary> public readonly void SetComputeRootDescriptorTable(uint RootParameterIndex, GpuDescriptorHandle BaseDescriptor) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, uint, GpuDescriptorHandle, void>)LpVtbl[31])(@this, RootParameterIndex, BaseDescriptor); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, uint, GpuDescriptorHandle, void>)LpVtbl[31])(@this, RootParameterIndex, BaseDescriptor); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, uint, GpuDescriptorHandle, void>)LpVtbl[31])(@this, RootParameterIndex, BaseDescriptor); } #endif } /// <summary>To be documented.</summary> public readonly void SetGraphicsRootDescriptorTable(uint RootParameterIndex, GpuDescriptorHandle BaseDescriptor) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, uint, GpuDescriptorHandle, void>)LpVtbl[32])(@this, RootParameterIndex, BaseDescriptor); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, uint, GpuDescriptorHandle, void>)LpVtbl[32])(@this, RootParameterIndex, BaseDescriptor); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, uint, GpuDescriptorHandle, void>)LpVtbl[32])(@this, RootParameterIndex, BaseDescriptor); } #endif } /// <summary>To be documented.</summary> public readonly void SetComputeRoot32BitConstant(uint RootParameterIndex, uint SrcData, uint DestOffsetIn32BitValues) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, uint, uint, uint, void>)LpVtbl[33])(@this, RootParameterIndex, SrcData, DestOffsetIn32BitValues); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, uint, uint, uint, void>)LpVtbl[33])(@this, RootParameterIndex, SrcData, DestOffsetIn32BitValues); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, uint, uint, uint, void>)LpVtbl[33])(@this, RootParameterIndex, SrcData, DestOffsetIn32BitValues); } #endif } /// <summary>To be documented.</summary> public readonly void SetGraphicsRoot32BitConstant(uint RootParameterIndex, uint SrcData, uint DestOffsetIn32BitValues) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, uint, uint, uint, void>)LpVtbl[34])(@this, RootParameterIndex, SrcData, DestOffsetIn32BitValues); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, uint, uint, uint, void>)LpVtbl[34])(@this, RootParameterIndex, SrcData, DestOffsetIn32BitValues); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, uint, uint, uint, void>)LpVtbl[34])(@this, RootParameterIndex, SrcData, DestOffsetIn32BitValues); } #endif } /// <summary>To be documented.</summary> public readonly unsafe void SetComputeRoot32BitConstants(uint RootParameterIndex, uint Num32BitValuesToSet, void* pSrcData, uint DestOffsetIn32BitValues) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, uint, uint, void*, uint, void>)LpVtbl[35])(@this, RootParameterIndex, Num32BitValuesToSet, pSrcData, DestOffsetIn32BitValues); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, uint, uint, void*, uint, void>)LpVtbl[35])(@this, RootParameterIndex, Num32BitValuesToSet, pSrcData, DestOffsetIn32BitValues); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, uint, uint, void*, uint, void>)LpVtbl[35])(@this, RootParameterIndex, Num32BitValuesToSet, pSrcData, DestOffsetIn32BitValues); } #endif } /// <summary>To be documented.</summary> public readonly void SetComputeRoot32BitConstants<T0>(uint RootParameterIndex, uint Num32BitValuesToSet, ref T0 pSrcData, uint DestOffsetIn32BitValues) where T0 : unmanaged { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (void* pSrcDataPtr = &pSrcData) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, uint, uint, void*, uint, void>)LpVtbl[35])(@this, RootParameterIndex, Num32BitValuesToSet, pSrcDataPtr, DestOffsetIn32BitValues); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, uint, uint, void*, uint, void>)LpVtbl[35])(@this, RootParameterIndex, Num32BitValuesToSet, pSrcDataPtr, DestOffsetIn32BitValues); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, uint, uint, void*, uint, void>)LpVtbl[35])(@this, RootParameterIndex, Num32BitValuesToSet, pSrcDataPtr, DestOffsetIn32BitValues); } #endif } } /// <summary>To be documented.</summary> public readonly unsafe void SetGraphicsRoot32BitConstants(uint RootParameterIndex, uint Num32BitValuesToSet, void* pSrcData, uint DestOffsetIn32BitValues) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, uint, uint, void*, uint, void>)LpVtbl[36])(@this, RootParameterIndex, Num32BitValuesToSet, pSrcData, DestOffsetIn32BitValues); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, uint, uint, void*, uint, void>)LpVtbl[36])(@this, RootParameterIndex, Num32BitValuesToSet, pSrcData, DestOffsetIn32BitValues); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, uint, uint, void*, uint, void>)LpVtbl[36])(@this, RootParameterIndex, Num32BitValuesToSet, pSrcData, DestOffsetIn32BitValues); } #endif } /// <summary>To be documented.</summary> public readonly void SetGraphicsRoot32BitConstants<T0>(uint RootParameterIndex, uint Num32BitValuesToSet, ref T0 pSrcData, uint DestOffsetIn32BitValues) where T0 : unmanaged { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (void* pSrcDataPtr = &pSrcData) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, uint, uint, void*, uint, void>)LpVtbl[36])(@this, RootParameterIndex, Num32BitValuesToSet, pSrcDataPtr, DestOffsetIn32BitValues); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, uint, uint, void*, uint, void>)LpVtbl[36])(@this, RootParameterIndex, Num32BitValuesToSet, pSrcDataPtr, DestOffsetIn32BitValues); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, uint, uint, void*, uint, void>)LpVtbl[36])(@this, RootParameterIndex, Num32BitValuesToSet, pSrcDataPtr, DestOffsetIn32BitValues); } #endif } } /// <summary>To be documented.</summary> public readonly void SetComputeRootConstantBufferView(uint RootParameterIndex, ulong BufferLocation) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, uint, ulong, void>)LpVtbl[37])(@this, RootParameterIndex, BufferLocation); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, uint, ulong, void>)LpVtbl[37])(@this, RootParameterIndex, BufferLocation); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, uint, ulong, void>)LpVtbl[37])(@this, RootParameterIndex, BufferLocation); } #endif } /// <summary>To be documented.</summary> public readonly void SetGraphicsRootConstantBufferView(uint RootParameterIndex, ulong BufferLocation) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, uint, ulong, void>)LpVtbl[38])(@this, RootParameterIndex, BufferLocation); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, uint, ulong, void>)LpVtbl[38])(@this, RootParameterIndex, BufferLocation); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, uint, ulong, void>)LpVtbl[38])(@this, RootParameterIndex, BufferLocation); } #endif } /// <summary>To be documented.</summary> public readonly void SetComputeRootShaderResourceView(uint RootParameterIndex, ulong BufferLocation) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, uint, ulong, void>)LpVtbl[39])(@this, RootParameterIndex, BufferLocation); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, uint, ulong, void>)LpVtbl[39])(@this, RootParameterIndex, BufferLocation); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, uint, ulong, void>)LpVtbl[39])(@this, RootParameterIndex, BufferLocation); } #endif } /// <summary>To be documented.</summary> public readonly void SetGraphicsRootShaderResourceView(uint RootParameterIndex, ulong BufferLocation) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, uint, ulong, void>)LpVtbl[40])(@this, RootParameterIndex, BufferLocation); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, uint, ulong, void>)LpVtbl[40])(@this, RootParameterIndex, BufferLocation); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, uint, ulong, void>)LpVtbl[40])(@this, RootParameterIndex, BufferLocation); } #endif } /// <summary>To be documented.</summary> public readonly void SetComputeRootUnorderedAccessView(uint RootParameterIndex, ulong BufferLocation) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, uint, ulong, void>)LpVtbl[41])(@this, RootParameterIndex, BufferLocation); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, uint, ulong, void>)LpVtbl[41])(@this, RootParameterIndex, BufferLocation); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, uint, ulong, void>)LpVtbl[41])(@this, RootParameterIndex, BufferLocation); } #endif } /// <summary>To be documented.</summary> public readonly void SetGraphicsRootUnorderedAccessView(uint RootParameterIndex, ulong BufferLocation) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, uint, ulong, void>)LpVtbl[42])(@this, RootParameterIndex, BufferLocation); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, uint, ulong, void>)LpVtbl[42])(@this, RootParameterIndex, BufferLocation); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, uint, ulong, void>)LpVtbl[42])(@this, RootParameterIndex, BufferLocation); } #endif } /// <summary>To be documented.</summary> public readonly unsafe void IASetIndexBuffer(IndexBufferView* pView) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, IndexBufferView*, void>)LpVtbl[43])(@this, pView); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, IndexBufferView*, void>)LpVtbl[43])(@this, pView); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, IndexBufferView*, void>)LpVtbl[43])(@this, pView); } #endif } /// <summary>To be documented.</summary> public readonly void IASetIndexBuffer(ref IndexBufferView pView) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (IndexBufferView* pViewPtr = &pView) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, IndexBufferView*, void>)LpVtbl[43])(@this, pViewPtr); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, IndexBufferView*, void>)LpVtbl[43])(@this, pViewPtr); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, IndexBufferView*, void>)LpVtbl[43])(@this, pViewPtr); } #endif } } /// <summary>To be documented.</summary> public readonly unsafe void IASetVertexBuffers(uint StartSlot, uint NumViews, VertexBufferView* pViews) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, uint, uint, VertexBufferView*, void>)LpVtbl[44])(@this, StartSlot, NumViews, pViews); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, uint, uint, VertexBufferView*, void>)LpVtbl[44])(@this, StartSlot, NumViews, pViews); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, uint, uint, VertexBufferView*, void>)LpVtbl[44])(@this, StartSlot, NumViews, pViews); } #endif } /// <summary>To be documented.</summary> public readonly void IASetVertexBuffers(uint StartSlot, uint NumViews, ref VertexBufferView pViews) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (VertexBufferView* pViewsPtr = &pViews) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, uint, uint, VertexBufferView*, void>)LpVtbl[44])(@this, StartSlot, NumViews, pViewsPtr); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, uint, uint, VertexBufferView*, void>)LpVtbl[44])(@this, StartSlot, NumViews, pViewsPtr); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, uint, uint, VertexBufferView*, void>)LpVtbl[44])(@this, StartSlot, NumViews, pViewsPtr); } #endif } } /// <summary>To be documented.</summary> public readonly unsafe void SOSetTargets(uint StartSlot, uint NumViews, StreamOutputBufferView* pViews) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, uint, uint, StreamOutputBufferView*, void>)LpVtbl[45])(@this, StartSlot, NumViews, pViews); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, uint, uint, StreamOutputBufferView*, void>)LpVtbl[45])(@this, StartSlot, NumViews, pViews); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, uint, uint, StreamOutputBufferView*, void>)LpVtbl[45])(@this, StartSlot, NumViews, pViews); } #endif } /// <summary>To be documented.</summary> public readonly void SOSetTargets(uint StartSlot, uint NumViews, ref StreamOutputBufferView pViews) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (StreamOutputBufferView* pViewsPtr = &pViews) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, uint, uint, StreamOutputBufferView*, void>)LpVtbl[45])(@this, StartSlot, NumViews, pViewsPtr); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, uint, uint, StreamOutputBufferView*, void>)LpVtbl[45])(@this, StartSlot, NumViews, pViewsPtr); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, uint, uint, StreamOutputBufferView*, void>)LpVtbl[45])(@this, StartSlot, NumViews, pViewsPtr); } #endif } } /// <summary>To be documented.</summary> public readonly unsafe void OMSetRenderTargets(uint NumRenderTargetDescriptors, CpuDescriptorHandle* pRenderTargetDescriptors, int RTsSingleHandleToDescriptorRange, CpuDescriptorHandle* pDepthStencilDescriptor) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, uint, CpuDescriptorHandle*, int, CpuDescriptorHandle*, void>)LpVtbl[46])(@this, NumRenderTargetDescriptors, pRenderTargetDescriptors, RTsSingleHandleToDescriptorRange, pDepthStencilDescriptor); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, uint, CpuDescriptorHandle*, int, CpuDescriptorHandle*, void>)LpVtbl[46])(@this, NumRenderTargetDescriptors, pRenderTargetDescriptors, RTsSingleHandleToDescriptorRange, pDepthStencilDescriptor); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, uint, CpuDescriptorHandle*, int, CpuDescriptorHandle*, void>)LpVtbl[46])(@this, NumRenderTargetDescriptors, pRenderTargetDescriptors, RTsSingleHandleToDescriptorRange, pDepthStencilDescriptor); } #endif } /// <summary>To be documented.</summary> public readonly unsafe void OMSetRenderTargets(uint NumRenderTargetDescriptors, CpuDescriptorHandle* pRenderTargetDescriptors, int RTsSingleHandleToDescriptorRange, ref CpuDescriptorHandle pDepthStencilDescriptor) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (CpuDescriptorHandle* pDepthStencilDescriptorPtr = &pDepthStencilDescriptor) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, uint, CpuDescriptorHandle*, int, CpuDescriptorHandle*, void>)LpVtbl[46])(@this, NumRenderTargetDescriptors, pRenderTargetDescriptors, RTsSingleHandleToDescriptorRange, pDepthStencilDescriptorPtr); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, uint, CpuDescriptorHandle*, int, CpuDescriptorHandle*, void>)LpVtbl[46])(@this, NumRenderTargetDescriptors, pRenderTargetDescriptors, RTsSingleHandleToDescriptorRange, pDepthStencilDescriptorPtr); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, uint, CpuDescriptorHandle*, int, CpuDescriptorHandle*, void>)LpVtbl[46])(@this, NumRenderTargetDescriptors, pRenderTargetDescriptors, RTsSingleHandleToDescriptorRange, pDepthStencilDescriptorPtr); } #endif } } /// <summary>To be documented.</summary> public readonly unsafe void OMSetRenderTargets(uint NumRenderTargetDescriptors, ref CpuDescriptorHandle pRenderTargetDescriptors, int RTsSingleHandleToDescriptorRange, CpuDescriptorHandle* pDepthStencilDescriptor) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (CpuDescriptorHandle* pRenderTargetDescriptorsPtr = &pRenderTargetDescriptors) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, uint, CpuDescriptorHandle*, int, CpuDescriptorHandle*, void>)LpVtbl[46])(@this, NumRenderTargetDescriptors, pRenderTargetDescriptorsPtr, RTsSingleHandleToDescriptorRange, pDepthStencilDescriptor); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, uint, CpuDescriptorHandle*, int, CpuDescriptorHandle*, void>)LpVtbl[46])(@this, NumRenderTargetDescriptors, pRenderTargetDescriptorsPtr, RTsSingleHandleToDescriptorRange, pDepthStencilDescriptor); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, uint, CpuDescriptorHandle*, int, CpuDescriptorHandle*, void>)LpVtbl[46])(@this, NumRenderTargetDescriptors, pRenderTargetDescriptorsPtr, RTsSingleHandleToDescriptorRange, pDepthStencilDescriptor); } #endif } } /// <summary>To be documented.</summary> public readonly void OMSetRenderTargets(uint NumRenderTargetDescriptors, ref CpuDescriptorHandle pRenderTargetDescriptors, int RTsSingleHandleToDescriptorRange, ref CpuDescriptorHandle pDepthStencilDescriptor) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (CpuDescriptorHandle* pRenderTargetDescriptorsPtr = &pRenderTargetDescriptors) { fixed (CpuDescriptorHandle* pDepthStencilDescriptorPtr = &pDepthStencilDescriptor) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, uint, CpuDescriptorHandle*, int, CpuDescriptorHandle*, void>)LpVtbl[46])(@this, NumRenderTargetDescriptors, pRenderTargetDescriptorsPtr, RTsSingleHandleToDescriptorRange, pDepthStencilDescriptorPtr); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, uint, CpuDescriptorHandle*, int, CpuDescriptorHandle*, void>)LpVtbl[46])(@this, NumRenderTargetDescriptors, pRenderTargetDescriptorsPtr, RTsSingleHandleToDescriptorRange, pDepthStencilDescriptorPtr); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, uint, CpuDescriptorHandle*, int, CpuDescriptorHandle*, void>)LpVtbl[46])(@this, NumRenderTargetDescriptors, pRenderTargetDescriptorsPtr, RTsSingleHandleToDescriptorRange, pDepthStencilDescriptorPtr); } #endif } } } /// <summary>To be documented.</summary> public readonly unsafe void ClearDepthStencilView(CpuDescriptorHandle DepthStencilView, ClearFlags ClearFlags, float Depth, byte Stencil, uint NumRects, Silk.NET.Maths.Rectangle<int>* pRects) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, CpuDescriptorHandle, ClearFlags, float, byte, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[47])(@this, DepthStencilView, ClearFlags, Depth, Stencil, NumRects, pRects); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, CpuDescriptorHandle, ClearFlags, float, byte, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[47])(@this, DepthStencilView, ClearFlags, Depth, Stencil, NumRects, pRects); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, CpuDescriptorHandle, ClearFlags, float, byte, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[47])(@this, DepthStencilView, ClearFlags, Depth, Stencil, NumRects, pRects); } #endif } /// <summary>To be documented.</summary> public readonly void ClearDepthStencilView(CpuDescriptorHandle DepthStencilView, ClearFlags ClearFlags, float Depth, byte Stencil, uint NumRects, ref Silk.NET.Maths.Rectangle<int> pRects) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (Silk.NET.Maths.Rectangle<int>* pRectsPtr = &pRects) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, CpuDescriptorHandle, ClearFlags, float, byte, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[47])(@this, DepthStencilView, ClearFlags, Depth, Stencil, NumRects, pRectsPtr); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, CpuDescriptorHandle, ClearFlags, float, byte, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[47])(@this, DepthStencilView, ClearFlags, Depth, Stencil, NumRects, pRectsPtr); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, CpuDescriptorHandle, ClearFlags, float, byte, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[47])(@this, DepthStencilView, ClearFlags, Depth, Stencil, NumRects, pRectsPtr); } #endif } } /// <summary>To be documented.</summary> public readonly unsafe void ClearRenderTargetView(CpuDescriptorHandle RenderTargetView, [Count(Count = 4)] float* ColorRGBA, uint NumRects, Silk.NET.Maths.Rectangle<int>* pRects) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, CpuDescriptorHandle, float*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[48])(@this, RenderTargetView, ColorRGBA, NumRects, pRects); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, CpuDescriptorHandle, float*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[48])(@this, RenderTargetView, ColorRGBA, NumRects, pRects); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, CpuDescriptorHandle, float*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[48])(@this, RenderTargetView, ColorRGBA, NumRects, pRects); } #endif } /// <summary>To be documented.</summary> public readonly unsafe void ClearRenderTargetView(CpuDescriptorHandle RenderTargetView, [Count(Count = 4)] float* ColorRGBA, uint NumRects, ref Silk.NET.Maths.Rectangle<int> pRects) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (Silk.NET.Maths.Rectangle<int>* pRectsPtr = &pRects) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, CpuDescriptorHandle, float*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[48])(@this, RenderTargetView, ColorRGBA, NumRects, pRectsPtr); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, CpuDescriptorHandle, float*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[48])(@this, RenderTargetView, ColorRGBA, NumRects, pRectsPtr); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, CpuDescriptorHandle, float*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[48])(@this, RenderTargetView, ColorRGBA, NumRects, pRectsPtr); } #endif } } /// <summary>To be documented.</summary> public readonly unsafe void ClearRenderTargetView(CpuDescriptorHandle RenderTargetView, [Count(Count = 4)] ref float ColorRGBA, uint NumRects, Silk.NET.Maths.Rectangle<int>* pRects) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (float* ColorRGBAPtr = &ColorRGBA) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, CpuDescriptorHandle, float*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[48])(@this, RenderTargetView, ColorRGBAPtr, NumRects, pRects); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, CpuDescriptorHandle, float*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[48])(@this, RenderTargetView, ColorRGBAPtr, NumRects, pRects); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, CpuDescriptorHandle, float*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[48])(@this, RenderTargetView, ColorRGBAPtr, NumRects, pRects); } #endif } } /// <summary>To be documented.</summary> public readonly void ClearRenderTargetView(CpuDescriptorHandle RenderTargetView, [Count(Count = 4)] ref float ColorRGBA, uint NumRects, ref Silk.NET.Maths.Rectangle<int> pRects) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (float* ColorRGBAPtr = &ColorRGBA) { fixed (Silk.NET.Maths.Rectangle<int>* pRectsPtr = &pRects) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, CpuDescriptorHandle, float*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[48])(@this, RenderTargetView, ColorRGBAPtr, NumRects, pRectsPtr); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, CpuDescriptorHandle, float*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[48])(@this, RenderTargetView, ColorRGBAPtr, NumRects, pRectsPtr); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, CpuDescriptorHandle, float*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[48])(@this, RenderTargetView, ColorRGBAPtr, NumRects, pRectsPtr); } #endif } } } /// <summary>To be documented.</summary> public readonly unsafe void ClearUnorderedAccessViewUint(GpuDescriptorHandle ViewGPUHandleInCurrentHeap, CpuDescriptorHandle ViewCPUHandle, ID3D12Resource* pResource, [Count(Count = 4)] uint* Values, uint NumRects, Silk.NET.Maths.Rectangle<int>* pRects) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, uint*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[49])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResource, Values, NumRects, pRects); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, uint*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[49])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResource, Values, NumRects, pRects); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, uint*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[49])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResource, Values, NumRects, pRects); } #endif } /// <summary>To be documented.</summary> public readonly unsafe void ClearUnorderedAccessViewUint(GpuDescriptorHandle ViewGPUHandleInCurrentHeap, CpuDescriptorHandle ViewCPUHandle, ID3D12Resource* pResource, [Count(Count = 4)] uint* Values, uint NumRects, ref Silk.NET.Maths.Rectangle<int> pRects) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (Silk.NET.Maths.Rectangle<int>* pRectsPtr = &pRects) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, uint*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[49])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResource, Values, NumRects, pRectsPtr); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, uint*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[49])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResource, Values, NumRects, pRectsPtr); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, uint*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[49])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResource, Values, NumRects, pRectsPtr); } #endif } } /// <summary>To be documented.</summary> public readonly unsafe void ClearUnorderedAccessViewUint(GpuDescriptorHandle ViewGPUHandleInCurrentHeap, CpuDescriptorHandle ViewCPUHandle, ID3D12Resource* pResource, [Count(Count = 4)] ref uint Values, uint NumRects, Silk.NET.Maths.Rectangle<int>* pRects) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (uint* ValuesPtr = &Values) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, uint*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[49])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResource, ValuesPtr, NumRects, pRects); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, uint*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[49])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResource, ValuesPtr, NumRects, pRects); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, uint*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[49])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResource, ValuesPtr, NumRects, pRects); } #endif } } /// <summary>To be documented.</summary> public readonly unsafe void ClearUnorderedAccessViewUint(GpuDescriptorHandle ViewGPUHandleInCurrentHeap, CpuDescriptorHandle ViewCPUHandle, ID3D12Resource* pResource, [Count(Count = 4)] ref uint Values, uint NumRects, ref Silk.NET.Maths.Rectangle<int> pRects) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (uint* ValuesPtr = &Values) { fixed (Silk.NET.Maths.Rectangle<int>* pRectsPtr = &pRects) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, uint*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[49])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResource, ValuesPtr, NumRects, pRectsPtr); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, uint*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[49])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResource, ValuesPtr, NumRects, pRectsPtr); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, uint*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[49])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResource, ValuesPtr, NumRects, pRectsPtr); } #endif } } } /// <summary>To be documented.</summary> public readonly unsafe void ClearUnorderedAccessViewUint(GpuDescriptorHandle ViewGPUHandleInCurrentHeap, CpuDescriptorHandle ViewCPUHandle, ref ID3D12Resource pResource, [Count(Count = 4)] uint* Values, uint NumRects, Silk.NET.Maths.Rectangle<int>* pRects) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12Resource* pResourcePtr = &pResource) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, uint*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[49])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResourcePtr, Values, NumRects, pRects); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, uint*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[49])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResourcePtr, Values, NumRects, pRects); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, uint*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[49])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResourcePtr, Values, NumRects, pRects); } #endif } } /// <summary>To be documented.</summary> public readonly unsafe void ClearUnorderedAccessViewUint(GpuDescriptorHandle ViewGPUHandleInCurrentHeap, CpuDescriptorHandle ViewCPUHandle, ref ID3D12Resource pResource, [Count(Count = 4)] uint* Values, uint NumRects, ref Silk.NET.Maths.Rectangle<int> pRects) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12Resource* pResourcePtr = &pResource) { fixed (Silk.NET.Maths.Rectangle<int>* pRectsPtr = &pRects) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, uint*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[49])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResourcePtr, Values, NumRects, pRectsPtr); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, uint*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[49])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResourcePtr, Values, NumRects, pRectsPtr); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, uint*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[49])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResourcePtr, Values, NumRects, pRectsPtr); } #endif } } } /// <summary>To be documented.</summary> public readonly unsafe void ClearUnorderedAccessViewUint(GpuDescriptorHandle ViewGPUHandleInCurrentHeap, CpuDescriptorHandle ViewCPUHandle, ref ID3D12Resource pResource, [Count(Count = 4)] ref uint Values, uint NumRects, Silk.NET.Maths.Rectangle<int>* pRects) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12Resource* pResourcePtr = &pResource) { fixed (uint* ValuesPtr = &Values) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, uint*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[49])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResourcePtr, ValuesPtr, NumRects, pRects); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, uint*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[49])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResourcePtr, ValuesPtr, NumRects, pRects); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, uint*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[49])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResourcePtr, ValuesPtr, NumRects, pRects); } #endif } } } /// <summary>To be documented.</summary> public readonly void ClearUnorderedAccessViewUint(GpuDescriptorHandle ViewGPUHandleInCurrentHeap, CpuDescriptorHandle ViewCPUHandle, ref ID3D12Resource pResource, [Count(Count = 4)] ref uint Values, uint NumRects, ref Silk.NET.Maths.Rectangle<int> pRects) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12Resource* pResourcePtr = &pResource) { fixed (uint* ValuesPtr = &Values) { fixed (Silk.NET.Maths.Rectangle<int>* pRectsPtr = &pRects) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, uint*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[49])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResourcePtr, ValuesPtr, NumRects, pRectsPtr); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, uint*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[49])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResourcePtr, ValuesPtr, NumRects, pRectsPtr); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, uint*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[49])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResourcePtr, ValuesPtr, NumRects, pRectsPtr); } #endif } } } } /// <summary>To be documented.</summary> public readonly unsafe void ClearUnorderedAccessViewFloat(GpuDescriptorHandle ViewGPUHandleInCurrentHeap, CpuDescriptorHandle ViewCPUHandle, ID3D12Resource* pResource, [Count(Count = 4)] float* Values, uint NumRects, Silk.NET.Maths.Rectangle<int>* pRects) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, float*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[50])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResource, Values, NumRects, pRects); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, float*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[50])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResource, Values, NumRects, pRects); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, float*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[50])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResource, Values, NumRects, pRects); } #endif } /// <summary>To be documented.</summary> public readonly unsafe void ClearUnorderedAccessViewFloat(GpuDescriptorHandle ViewGPUHandleInCurrentHeap, CpuDescriptorHandle ViewCPUHandle, ID3D12Resource* pResource, [Count(Count = 4)] float* Values, uint NumRects, ref Silk.NET.Maths.Rectangle<int> pRects) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (Silk.NET.Maths.Rectangle<int>* pRectsPtr = &pRects) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, float*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[50])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResource, Values, NumRects, pRectsPtr); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, float*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[50])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResource, Values, NumRects, pRectsPtr); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, float*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[50])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResource, Values, NumRects, pRectsPtr); } #endif } } /// <summary>To be documented.</summary> public readonly unsafe void ClearUnorderedAccessViewFloat(GpuDescriptorHandle ViewGPUHandleInCurrentHeap, CpuDescriptorHandle ViewCPUHandle, ID3D12Resource* pResource, [Count(Count = 4)] ref float Values, uint NumRects, Silk.NET.Maths.Rectangle<int>* pRects) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (float* ValuesPtr = &Values) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, float*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[50])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResource, ValuesPtr, NumRects, pRects); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, float*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[50])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResource, ValuesPtr, NumRects, pRects); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, float*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[50])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResource, ValuesPtr, NumRects, pRects); } #endif } } /// <summary>To be documented.</summary> public readonly unsafe void ClearUnorderedAccessViewFloat(GpuDescriptorHandle ViewGPUHandleInCurrentHeap, CpuDescriptorHandle ViewCPUHandle, ID3D12Resource* pResource, [Count(Count = 4)] ref float Values, uint NumRects, ref Silk.NET.Maths.Rectangle<int> pRects) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (float* ValuesPtr = &Values) { fixed (Silk.NET.Maths.Rectangle<int>* pRectsPtr = &pRects) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, float*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[50])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResource, ValuesPtr, NumRects, pRectsPtr); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, float*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[50])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResource, ValuesPtr, NumRects, pRectsPtr); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, float*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[50])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResource, ValuesPtr, NumRects, pRectsPtr); } #endif } } } /// <summary>To be documented.</summary> public readonly unsafe void ClearUnorderedAccessViewFloat(GpuDescriptorHandle ViewGPUHandleInCurrentHeap, CpuDescriptorHandle ViewCPUHandle, ref ID3D12Resource pResource, [Count(Count = 4)] float* Values, uint NumRects, Silk.NET.Maths.Rectangle<int>* pRects) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12Resource* pResourcePtr = &pResource) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, float*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[50])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResourcePtr, Values, NumRects, pRects); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, float*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[50])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResourcePtr, Values, NumRects, pRects); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, float*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[50])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResourcePtr, Values, NumRects, pRects); } #endif } } /// <summary>To be documented.</summary> public readonly unsafe void ClearUnorderedAccessViewFloat(GpuDescriptorHandle ViewGPUHandleInCurrentHeap, CpuDescriptorHandle ViewCPUHandle, ref ID3D12Resource pResource, [Count(Count = 4)] float* Values, uint NumRects, ref Silk.NET.Maths.Rectangle<int> pRects) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12Resource* pResourcePtr = &pResource) { fixed (Silk.NET.Maths.Rectangle<int>* pRectsPtr = &pRects) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, float*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[50])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResourcePtr, Values, NumRects, pRectsPtr); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, float*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[50])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResourcePtr, Values, NumRects, pRectsPtr); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, float*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[50])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResourcePtr, Values, NumRects, pRectsPtr); } #endif } } } /// <summary>To be documented.</summary> public readonly unsafe void ClearUnorderedAccessViewFloat(GpuDescriptorHandle ViewGPUHandleInCurrentHeap, CpuDescriptorHandle ViewCPUHandle, ref ID3D12Resource pResource, [Count(Count = 4)] ref float Values, uint NumRects, Silk.NET.Maths.Rectangle<int>* pRects) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12Resource* pResourcePtr = &pResource) { fixed (float* ValuesPtr = &Values) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, float*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[50])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResourcePtr, ValuesPtr, NumRects, pRects); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, float*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[50])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResourcePtr, ValuesPtr, NumRects, pRects); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, float*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[50])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResourcePtr, ValuesPtr, NumRects, pRects); } #endif } } } /// <summary>To be documented.</summary> public readonly void ClearUnorderedAccessViewFloat(GpuDescriptorHandle ViewGPUHandleInCurrentHeap, CpuDescriptorHandle ViewCPUHandle, ref ID3D12Resource pResource, [Count(Count = 4)] ref float Values, uint NumRects, ref Silk.NET.Maths.Rectangle<int> pRects) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12Resource* pResourcePtr = &pResource) { fixed (float* ValuesPtr = &Values) { fixed (Silk.NET.Maths.Rectangle<int>* pRectsPtr = &pRects) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, float*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[50])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResourcePtr, ValuesPtr, NumRects, pRectsPtr); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, float*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[50])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResourcePtr, ValuesPtr, NumRects, pRectsPtr); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, GpuDescriptorHandle, CpuDescriptorHandle, ID3D12Resource*, float*, uint, Silk.NET.Maths.Rectangle<int>*, void>)LpVtbl[50])(@this, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResourcePtr, ValuesPtr, NumRects, pRectsPtr); } #endif } } } } /// <summary>To be documented.</summary> public readonly unsafe void DiscardResource(ID3D12Resource* pResource, DiscardRegion* pRegion) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12Resource*, DiscardRegion*, void>)LpVtbl[51])(@this, pResource, pRegion); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12Resource*, DiscardRegion*, void>)LpVtbl[51])(@this, pResource, pRegion); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12Resource*, DiscardRegion*, void>)LpVtbl[51])(@this, pResource, pRegion); } #endif } /// <summary>To be documented.</summary> public readonly unsafe void DiscardResource(ID3D12Resource* pResource, ref DiscardRegion pRegion) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (DiscardRegion* pRegionPtr = &pRegion) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12Resource*, DiscardRegion*, void>)LpVtbl[51])(@this, pResource, pRegionPtr); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12Resource*, DiscardRegion*, void>)LpVtbl[51])(@this, pResource, pRegionPtr); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12Resource*, DiscardRegion*, void>)LpVtbl[51])(@this, pResource, pRegionPtr); } #endif } } /// <summary>To be documented.</summary> public readonly unsafe void DiscardResource(ref ID3D12Resource pResource, DiscardRegion* pRegion) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12Resource* pResourcePtr = &pResource) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12Resource*, DiscardRegion*, void>)LpVtbl[51])(@this, pResourcePtr, pRegion); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12Resource*, DiscardRegion*, void>)LpVtbl[51])(@this, pResourcePtr, pRegion); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12Resource*, DiscardRegion*, void>)LpVtbl[51])(@this, pResourcePtr, pRegion); } #endif } } /// <summary>To be documented.</summary> public readonly void DiscardResource(ref ID3D12Resource pResource, ref DiscardRegion pRegion) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12Resource* pResourcePtr = &pResource) { fixed (DiscardRegion* pRegionPtr = &pRegion) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12Resource*, DiscardRegion*, void>)LpVtbl[51])(@this, pResourcePtr, pRegionPtr); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12Resource*, DiscardRegion*, void>)LpVtbl[51])(@this, pResourcePtr, pRegionPtr); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12Resource*, DiscardRegion*, void>)LpVtbl[51])(@this, pResourcePtr, pRegionPtr); } #endif } } } /// <summary>To be documented.</summary> public readonly unsafe void BeginQuery(ID3D12QueryHeap* pQueryHeap, QueryType Type, uint Index) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12QueryHeap*, QueryType, uint, void>)LpVtbl[52])(@this, pQueryHeap, Type, Index); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12QueryHeap*, QueryType, uint, void>)LpVtbl[52])(@this, pQueryHeap, Type, Index); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12QueryHeap*, QueryType, uint, void>)LpVtbl[52])(@this, pQueryHeap, Type, Index); } #endif } /// <summary>To be documented.</summary> public readonly void BeginQuery(ref ID3D12QueryHeap pQueryHeap, QueryType Type, uint Index) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12QueryHeap* pQueryHeapPtr = &pQueryHeap) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12QueryHeap*, QueryType, uint, void>)LpVtbl[52])(@this, pQueryHeapPtr, Type, Index); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12QueryHeap*, QueryType, uint, void>)LpVtbl[52])(@this, pQueryHeapPtr, Type, Index); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12QueryHeap*, QueryType, uint, void>)LpVtbl[52])(@this, pQueryHeapPtr, Type, Index); } #endif } } /// <summary>To be documented.</summary> public readonly unsafe void EndQuery(ID3D12QueryHeap* pQueryHeap, QueryType Type, uint Index) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12QueryHeap*, QueryType, uint, void>)LpVtbl[53])(@this, pQueryHeap, Type, Index); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12QueryHeap*, QueryType, uint, void>)LpVtbl[53])(@this, pQueryHeap, Type, Index); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12QueryHeap*, QueryType, uint, void>)LpVtbl[53])(@this, pQueryHeap, Type, Index); } #endif } /// <summary>To be documented.</summary> public readonly void EndQuery(ref ID3D12QueryHeap pQueryHeap, QueryType Type, uint Index) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12QueryHeap* pQueryHeapPtr = &pQueryHeap) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12QueryHeap*, QueryType, uint, void>)LpVtbl[53])(@this, pQueryHeapPtr, Type, Index); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12QueryHeap*, QueryType, uint, void>)LpVtbl[53])(@this, pQueryHeapPtr, Type, Index); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12QueryHeap*, QueryType, uint, void>)LpVtbl[53])(@this, pQueryHeapPtr, Type, Index); } #endif } } /// <summary>To be documented.</summary> public readonly unsafe void ResolveQueryData(ID3D12QueryHeap* pQueryHeap, QueryType Type, uint StartIndex, uint NumQueries, ID3D12Resource* pDestinationBuffer, ulong AlignedDestinationBufferOffset) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12QueryHeap*, QueryType, uint, uint, ID3D12Resource*, ulong, void>)LpVtbl[54])(@this, pQueryHeap, Type, StartIndex, NumQueries, pDestinationBuffer, AlignedDestinationBufferOffset); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12QueryHeap*, QueryType, uint, uint, ID3D12Resource*, ulong, void>)LpVtbl[54])(@this, pQueryHeap, Type, StartIndex, NumQueries, pDestinationBuffer, AlignedDestinationBufferOffset); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12QueryHeap*, QueryType, uint, uint, ID3D12Resource*, ulong, void>)LpVtbl[54])(@this, pQueryHeap, Type, StartIndex, NumQueries, pDestinationBuffer, AlignedDestinationBufferOffset); } #endif } /// <summary>To be documented.</summary> public readonly unsafe void ResolveQueryData(ID3D12QueryHeap* pQueryHeap, QueryType Type, uint StartIndex, uint NumQueries, ref ID3D12Resource pDestinationBuffer, ulong AlignedDestinationBufferOffset) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12Resource* pDestinationBufferPtr = &pDestinationBuffer) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12QueryHeap*, QueryType, uint, uint, ID3D12Resource*, ulong, void>)LpVtbl[54])(@this, pQueryHeap, Type, StartIndex, NumQueries, pDestinationBufferPtr, AlignedDestinationBufferOffset); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12QueryHeap*, QueryType, uint, uint, ID3D12Resource*, ulong, void>)LpVtbl[54])(@this, pQueryHeap, Type, StartIndex, NumQueries, pDestinationBufferPtr, AlignedDestinationBufferOffset); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12QueryHeap*, QueryType, uint, uint, ID3D12Resource*, ulong, void>)LpVtbl[54])(@this, pQueryHeap, Type, StartIndex, NumQueries, pDestinationBufferPtr, AlignedDestinationBufferOffset); } #endif } } /// <summary>To be documented.</summary> public readonly unsafe void ResolveQueryData(ref ID3D12QueryHeap pQueryHeap, QueryType Type, uint StartIndex, uint NumQueries, ID3D12Resource* pDestinationBuffer, ulong AlignedDestinationBufferOffset) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12QueryHeap* pQueryHeapPtr = &pQueryHeap) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12QueryHeap*, QueryType, uint, uint, ID3D12Resource*, ulong, void>)LpVtbl[54])(@this, pQueryHeapPtr, Type, StartIndex, NumQueries, pDestinationBuffer, AlignedDestinationBufferOffset); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12QueryHeap*, QueryType, uint, uint, ID3D12Resource*, ulong, void>)LpVtbl[54])(@this, pQueryHeapPtr, Type, StartIndex, NumQueries, pDestinationBuffer, AlignedDestinationBufferOffset); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12QueryHeap*, QueryType, uint, uint, ID3D12Resource*, ulong, void>)LpVtbl[54])(@this, pQueryHeapPtr, Type, StartIndex, NumQueries, pDestinationBuffer, AlignedDestinationBufferOffset); } #endif } } /// <summary>To be documented.</summary> public readonly void ResolveQueryData(ref ID3D12QueryHeap pQueryHeap, QueryType Type, uint StartIndex, uint NumQueries, ref ID3D12Resource pDestinationBuffer, ulong AlignedDestinationBufferOffset) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12QueryHeap* pQueryHeapPtr = &pQueryHeap) { fixed (ID3D12Resource* pDestinationBufferPtr = &pDestinationBuffer) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12QueryHeap*, QueryType, uint, uint, ID3D12Resource*, ulong, void>)LpVtbl[54])(@this, pQueryHeapPtr, Type, StartIndex, NumQueries, pDestinationBufferPtr, AlignedDestinationBufferOffset); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12QueryHeap*, QueryType, uint, uint, ID3D12Resource*, ulong, void>)LpVtbl[54])(@this, pQueryHeapPtr, Type, StartIndex, NumQueries, pDestinationBufferPtr, AlignedDestinationBufferOffset); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12QueryHeap*, QueryType, uint, uint, ID3D12Resource*, ulong, void>)LpVtbl[54])(@this, pQueryHeapPtr, Type, StartIndex, NumQueries, pDestinationBufferPtr, AlignedDestinationBufferOffset); } #endif } } } /// <summary>To be documented.</summary> public readonly unsafe void SetPredication(ID3D12Resource* pBuffer, ulong AlignedBufferOffset, PredicationOp Operation) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12Resource*, ulong, PredicationOp, void>)LpVtbl[55])(@this, pBuffer, AlignedBufferOffset, Operation); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12Resource*, ulong, PredicationOp, void>)LpVtbl[55])(@this, pBuffer, AlignedBufferOffset, Operation); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12Resource*, ulong, PredicationOp, void>)LpVtbl[55])(@this, pBuffer, AlignedBufferOffset, Operation); } #endif } /// <summary>To be documented.</summary> public readonly void SetPredication(ref ID3D12Resource pBuffer, ulong AlignedBufferOffset, PredicationOp Operation) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12Resource* pBufferPtr = &pBuffer) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12Resource*, ulong, PredicationOp, void>)LpVtbl[55])(@this, pBufferPtr, AlignedBufferOffset, Operation); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12Resource*, ulong, PredicationOp, void>)LpVtbl[55])(@this, pBufferPtr, AlignedBufferOffset, Operation); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12Resource*, ulong, PredicationOp, void>)LpVtbl[55])(@this, pBufferPtr, AlignedBufferOffset, Operation); } #endif } } /// <summary>To be documented.</summary> public readonly unsafe void SetMarker(uint Metadata, void* pData, uint Size) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, uint, void*, uint, void>)LpVtbl[56])(@this, Metadata, pData, Size); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, uint, void*, uint, void>)LpVtbl[56])(@this, Metadata, pData, Size); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, uint, void*, uint, void>)LpVtbl[56])(@this, Metadata, pData, Size); } #endif } /// <summary>To be documented.</summary> public readonly void SetMarker<T0>(uint Metadata, ref T0 pData, uint Size) where T0 : unmanaged { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (void* pDataPtr = &pData) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, uint, void*, uint, void>)LpVtbl[56])(@this, Metadata, pDataPtr, Size); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, uint, void*, uint, void>)LpVtbl[56])(@this, Metadata, pDataPtr, Size); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, uint, void*, uint, void>)LpVtbl[56])(@this, Metadata, pDataPtr, Size); } #endif } } /// <summary>To be documented.</summary> public readonly unsafe void BeginEvent(uint Metadata, void* pData, uint Size) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, uint, void*, uint, void>)LpVtbl[57])(@this, Metadata, pData, Size); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, uint, void*, uint, void>)LpVtbl[57])(@this, Metadata, pData, Size); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, uint, void*, uint, void>)LpVtbl[57])(@this, Metadata, pData, Size); } #endif } /// <summary>To be documented.</summary> public readonly void BeginEvent<T0>(uint Metadata, ref T0 pData, uint Size) where T0 : unmanaged { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (void* pDataPtr = &pData) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, uint, void*, uint, void>)LpVtbl[57])(@this, Metadata, pDataPtr, Size); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, uint, void*, uint, void>)LpVtbl[57])(@this, Metadata, pDataPtr, Size); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, uint, void*, uint, void>)LpVtbl[57])(@this, Metadata, pDataPtr, Size); } #endif } } /// <summary>To be documented.</summary> public readonly void EndEvent() { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, void>)LpVtbl[58])(@this); } /// <summary>To be documented.</summary> public readonly unsafe void ExecuteIndirect(ID3D12CommandSignature* pCommandSignature, uint MaxCommandCount, ID3D12Resource* pArgumentBuffer, ulong ArgumentBufferOffset, ID3D12Resource* pCountBuffer, ulong CountBufferOffset) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12CommandSignature*, uint, ID3D12Resource*, ulong, ID3D12Resource*, ulong, void>)LpVtbl[59])(@this, pCommandSignature, MaxCommandCount, pArgumentBuffer, ArgumentBufferOffset, pCountBuffer, CountBufferOffset); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12CommandSignature*, uint, ID3D12Resource*, ulong, ID3D12Resource*, ulong, void>)LpVtbl[59])(@this, pCommandSignature, MaxCommandCount, pArgumentBuffer, ArgumentBufferOffset, pCountBuffer, CountBufferOffset); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12CommandSignature*, uint, ID3D12Resource*, ulong, ID3D12Resource*, ulong, void>)LpVtbl[59])(@this, pCommandSignature, MaxCommandCount, pArgumentBuffer, ArgumentBufferOffset, pCountBuffer, CountBufferOffset); } #endif } /// <summary>To be documented.</summary> public readonly unsafe void ExecuteIndirect(ID3D12CommandSignature* pCommandSignature, uint MaxCommandCount, ID3D12Resource* pArgumentBuffer, ulong ArgumentBufferOffset, ref ID3D12Resource pCountBuffer, ulong CountBufferOffset) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12Resource* pCountBufferPtr = &pCountBuffer) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12CommandSignature*, uint, ID3D12Resource*, ulong, ID3D12Resource*, ulong, void>)LpVtbl[59])(@this, pCommandSignature, MaxCommandCount, pArgumentBuffer, ArgumentBufferOffset, pCountBufferPtr, CountBufferOffset); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12CommandSignature*, uint, ID3D12Resource*, ulong, ID3D12Resource*, ulong, void>)LpVtbl[59])(@this, pCommandSignature, MaxCommandCount, pArgumentBuffer, ArgumentBufferOffset, pCountBufferPtr, CountBufferOffset); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12CommandSignature*, uint, ID3D12Resource*, ulong, ID3D12Resource*, ulong, void>)LpVtbl[59])(@this, pCommandSignature, MaxCommandCount, pArgumentBuffer, ArgumentBufferOffset, pCountBufferPtr, CountBufferOffset); } #endif } } /// <summary>To be documented.</summary> public readonly unsafe void ExecuteIndirect(ID3D12CommandSignature* pCommandSignature, uint MaxCommandCount, ref ID3D12Resource pArgumentBuffer, ulong ArgumentBufferOffset, ID3D12Resource* pCountBuffer, ulong CountBufferOffset) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12Resource* pArgumentBufferPtr = &pArgumentBuffer) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12CommandSignature*, uint, ID3D12Resource*, ulong, ID3D12Resource*, ulong, void>)LpVtbl[59])(@this, pCommandSignature, MaxCommandCount, pArgumentBufferPtr, ArgumentBufferOffset, pCountBuffer, CountBufferOffset); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12CommandSignature*, uint, ID3D12Resource*, ulong, ID3D12Resource*, ulong, void>)LpVtbl[59])(@this, pCommandSignature, MaxCommandCount, pArgumentBufferPtr, ArgumentBufferOffset, pCountBuffer, CountBufferOffset); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12CommandSignature*, uint, ID3D12Resource*, ulong, ID3D12Resource*, ulong, void>)LpVtbl[59])(@this, pCommandSignature, MaxCommandCount, pArgumentBufferPtr, ArgumentBufferOffset, pCountBuffer, CountBufferOffset); } #endif } } /// <summary>To be documented.</summary> public readonly unsafe void ExecuteIndirect(ID3D12CommandSignature* pCommandSignature, uint MaxCommandCount, ref ID3D12Resource pArgumentBuffer, ulong ArgumentBufferOffset, ref ID3D12Resource pCountBuffer, ulong CountBufferOffset) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12Resource* pArgumentBufferPtr = &pArgumentBuffer) { fixed (ID3D12Resource* pCountBufferPtr = &pCountBuffer) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12CommandSignature*, uint, ID3D12Resource*, ulong, ID3D12Resource*, ulong, void>)LpVtbl[59])(@this, pCommandSignature, MaxCommandCount, pArgumentBufferPtr, ArgumentBufferOffset, pCountBufferPtr, CountBufferOffset); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12CommandSignature*, uint, ID3D12Resource*, ulong, ID3D12Resource*, ulong, void>)LpVtbl[59])(@this, pCommandSignature, MaxCommandCount, pArgumentBufferPtr, ArgumentBufferOffset, pCountBufferPtr, CountBufferOffset); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12CommandSignature*, uint, ID3D12Resource*, ulong, ID3D12Resource*, ulong, void>)LpVtbl[59])(@this, pCommandSignature, MaxCommandCount, pArgumentBufferPtr, ArgumentBufferOffset, pCountBufferPtr, CountBufferOffset); } #endif } } } /// <summary>To be documented.</summary> public readonly unsafe void ExecuteIndirect(ref ID3D12CommandSignature pCommandSignature, uint MaxCommandCount, ID3D12Resource* pArgumentBuffer, ulong ArgumentBufferOffset, ID3D12Resource* pCountBuffer, ulong CountBufferOffset) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12CommandSignature* pCommandSignaturePtr = &pCommandSignature) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12CommandSignature*, uint, ID3D12Resource*, ulong, ID3D12Resource*, ulong, void>)LpVtbl[59])(@this, pCommandSignaturePtr, MaxCommandCount, pArgumentBuffer, ArgumentBufferOffset, pCountBuffer, CountBufferOffset); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12CommandSignature*, uint, ID3D12Resource*, ulong, ID3D12Resource*, ulong, void>)LpVtbl[59])(@this, pCommandSignaturePtr, MaxCommandCount, pArgumentBuffer, ArgumentBufferOffset, pCountBuffer, CountBufferOffset); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12CommandSignature*, uint, ID3D12Resource*, ulong, ID3D12Resource*, ulong, void>)LpVtbl[59])(@this, pCommandSignaturePtr, MaxCommandCount, pArgumentBuffer, ArgumentBufferOffset, pCountBuffer, CountBufferOffset); } #endif } } /// <summary>To be documented.</summary> public readonly unsafe void ExecuteIndirect(ref ID3D12CommandSignature pCommandSignature, uint MaxCommandCount, ID3D12Resource* pArgumentBuffer, ulong ArgumentBufferOffset, ref ID3D12Resource pCountBuffer, ulong CountBufferOffset) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12CommandSignature* pCommandSignaturePtr = &pCommandSignature) { fixed (ID3D12Resource* pCountBufferPtr = &pCountBuffer) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12CommandSignature*, uint, ID3D12Resource*, ulong, ID3D12Resource*, ulong, void>)LpVtbl[59])(@this, pCommandSignaturePtr, MaxCommandCount, pArgumentBuffer, ArgumentBufferOffset, pCountBufferPtr, CountBufferOffset); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12CommandSignature*, uint, ID3D12Resource*, ulong, ID3D12Resource*, ulong, void>)LpVtbl[59])(@this, pCommandSignaturePtr, MaxCommandCount, pArgumentBuffer, ArgumentBufferOffset, pCountBufferPtr, CountBufferOffset); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12CommandSignature*, uint, ID3D12Resource*, ulong, ID3D12Resource*, ulong, void>)LpVtbl[59])(@this, pCommandSignaturePtr, MaxCommandCount, pArgumentBuffer, ArgumentBufferOffset, pCountBufferPtr, CountBufferOffset); } #endif } } } /// <summary>To be documented.</summary> public readonly unsafe void ExecuteIndirect(ref ID3D12CommandSignature pCommandSignature, uint MaxCommandCount, ref ID3D12Resource pArgumentBuffer, ulong ArgumentBufferOffset, ID3D12Resource* pCountBuffer, ulong CountBufferOffset) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12CommandSignature* pCommandSignaturePtr = &pCommandSignature) { fixed (ID3D12Resource* pArgumentBufferPtr = &pArgumentBuffer) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12CommandSignature*, uint, ID3D12Resource*, ulong, ID3D12Resource*, ulong, void>)LpVtbl[59])(@this, pCommandSignaturePtr, MaxCommandCount, pArgumentBufferPtr, ArgumentBufferOffset, pCountBuffer, CountBufferOffset); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12CommandSignature*, uint, ID3D12Resource*, ulong, ID3D12Resource*, ulong, void>)LpVtbl[59])(@this, pCommandSignaturePtr, MaxCommandCount, pArgumentBufferPtr, ArgumentBufferOffset, pCountBuffer, CountBufferOffset); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12CommandSignature*, uint, ID3D12Resource*, ulong, ID3D12Resource*, ulong, void>)LpVtbl[59])(@this, pCommandSignaturePtr, MaxCommandCount, pArgumentBufferPtr, ArgumentBufferOffset, pCountBuffer, CountBufferOffset); } #endif } } } /// <summary>To be documented.</summary> public readonly void ExecuteIndirect(ref ID3D12CommandSignature pCommandSignature, uint MaxCommandCount, ref ID3D12Resource pArgumentBuffer, ulong ArgumentBufferOffset, ref ID3D12Resource pCountBuffer, ulong CountBufferOffset) { var @this = (ID3D12GraphicsCommandList*) Unsafe.AsPointer(ref Unsafe.AsRef(in this)); fixed (ID3D12CommandSignature* pCommandSignaturePtr = &pCommandSignature) { fixed (ID3D12Resource* pArgumentBufferPtr = &pArgumentBuffer) { fixed (ID3D12Resource* pCountBufferPtr = &pCountBuffer) { #if NET5_0_OR_GREATER ((delegate* unmanaged<ID3D12GraphicsCommandList*, ID3D12CommandSignature*, uint, ID3D12Resource*, ulong, ID3D12Resource*, ulong, void>)LpVtbl[59])(@this, pCommandSignaturePtr, MaxCommandCount, pArgumentBufferPtr, ArgumentBufferOffset, pCountBufferPtr, CountBufferOffset); #else if (SilkMarshal.IsWinapiStdcall) { ((delegate* unmanaged[Stdcall]<ID3D12GraphicsCommandList*, ID3D12CommandSignature*, uint, ID3D12Resource*, ulong, ID3D12Resource*, ulong, void>)LpVtbl[59])(@this, pCommandSignaturePtr, MaxCommandCount, pArgumentBufferPtr, ArgumentBufferOffset, pCountBufferPtr, CountBufferOffset); } else { ((delegate* unmanaged[Cdecl]<ID3D12GraphicsCommandList*, ID3D12CommandSignature*, uint, ID3D12Resource*, ulong, ID3D12Resource*, ulong, void>)LpVtbl[59])(@this, pCommandSignaturePtr, MaxCommandCount, pArgumentBufferPtr, ArgumentBufferOffset, pCountBufferPtr, CountBufferOffset); } #endif } } } } } }
58.233056
330
0.614976
[ "MIT" ]
Ar37-rs/Silk.NET
src/Microsoft/Silk.NET.Direct3D12/Structs/ID3D12GraphicsCommandList.gen.cs
209,639
C#
using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerLaserController : ExecutableController, IAwakable, IEnableable, IDisaable, IUpdatable, ILateUpdatable { [SerializeField] private GameObject leftLaser; [SerializeField] private GameObject rightLaser; [SerializeField] private Transform playerBody; public void OnIAwake() { } public void OnIDisable() { InputController.mouseRightButtonPressed -= AimLaser; } public void OnIEnable() { InputController.mouseRightButtonPressed += AimLaser; } private void AimLaser(bool obj) { if (obj) { float leftLaserAngle = Mathf.LerpAngle(-5, 0.25f, 1f); leftLaser.transform.localEulerAngles = new Vector3(0, leftLaserAngle, 0); float rightLaserAngle = Mathf.LerpAngle(5, -0.25f, 1f); rightLaser.transform.localEulerAngles = new Vector3(0, rightLaserAngle, 0); } else { leftLaser.transform.localEulerAngles = new Vector3(0, -5, 0); rightLaser.transform.localEulerAngles = new Vector3(0, 5, 0); } } public void OnIUpdate() { } public void OnILateUpdate() { } }
24.960784
120
0.650432
[ "MIT" ]
kamcio819/OrbLAG2019
Assets/Scripts/PlayerLaserController.cs
1,275
C#
using UnityEngine; using UnityEngine.UIElements; using UnityEditor.UIElements; using Unity.Jobs; public class RawTextureDataProcessingExamplesWindow : UnityEditor.EditorWindow { Texture2D _texture; void OnEnable () { rootVisualElement.Clear(); var PREVIEW = new Image(); { PREVIEW.image = _texture; PREVIEW.scaleMode = ScaleMode.ScaleAndCrop; PREVIEW.style.flexGrow = 1f; } var INVERT = new VisualElement(); SetupStyle( INVERT ); var BUTTON_INVERT = new Button( ()=> InvertColors( _texture ) ); { BUTTON_INVERT.SetEnabled( _texture!=null ); BUTTON_INVERT.text = "Invert Colors"; } INVERT.Add( BUTTON_INVERT ); var EDGES = new VisualElement(); SetupStyle( EDGES ); var BUTTON_EDGES = new Button( ()=> EdgeDetect( _texture ) ); { BUTTON_EDGES.SetEnabled( _texture!=null ); BUTTON_EDGES.text = "Edge Detect"; } EDGES.Add( BUTTON_EDGES ); var BOX_BLUR = new VisualElement(); SetupStyle( BOX_BLUR , 46 ); var SLIDER_BOX_BLUR = new SliderInt( 1 , 100 ); { SLIDER_BOX_BLUR.value = 10; } var BUTTON_BOX_BLUR = new Button( ()=> BoxBlur( _texture , SLIDER_BOX_BLUR.value ) ); { BUTTON_BOX_BLUR.SetEnabled( _texture!=null ); BUTTON_BOX_BLUR.text = "Box Blur"; } BOX_BLUR.Add( BUTTON_BOX_BLUR ); BOX_BLUR.Add( SLIDER_BOX_BLUR ); var GAUSSIAN_BLUR = new VisualElement(); SetupStyle( GAUSSIAN_BLUR , 46 ); var SLIDER_GAUSSIAN_BLUR = new SliderInt( 1 , 100 ); { SLIDER_GAUSSIAN_BLUR.value = 10; } var BUTTON_GAUSSIAN_BLUR = new Button( ()=> GaussianBlur( _texture , SLIDER_GAUSSIAN_BLUR.value ) ); { BUTTON_GAUSSIAN_BLUR.SetEnabled( _texture!=null ); BUTTON_GAUSSIAN_BLUR.text = "Gaussian Blur"; } GAUSSIAN_BLUR.Add( BUTTON_GAUSSIAN_BLUR ); GAUSSIAN_BLUR.Add( SLIDER_GAUSSIAN_BLUR ); var GRAYSCALE = new VisualElement(); SetupStyle( GRAYSCALE ); var BUTTON_GRAYSCALE = new Button( ()=> Grayscale( _texture ) ); { BUTTON_GRAYSCALE.SetEnabled( _texture!=null ); BUTTON_GRAYSCALE.text = "Grayscale"; } GRAYSCALE.Add( BUTTON_GRAYSCALE ); var FIELD = new ObjectField(); { FIELD.objectType = typeof(Texture2D); FIELD.value = _texture; FIELD.RegisterValueChangedCallback( (e) => { var newTexture = e.newValue as Texture2D; if( newTexture!=null ) { if( !newTexture.isReadable ) { UnityEditor.EditorUtility.DisplayDialog( "Texture is not readable" , $"Texture '{newTexture.name}' is not readable. Choose different texture or enable \"Read/Write Enabled\" for needs of this demonstration." , "OK" ); return; } _texture = newTexture; PREVIEW.image = newTexture; bool b = true; PREVIEW.SetEnabled(b); BUTTON_INVERT.SetEnabled(b); BUTTON_EDGES.SetEnabled(b); BUTTON_BOX_BLUR.SetEnabled(b); BUTTON_GAUSSIAN_BLUR.SetEnabled(b); BUTTON_GRAYSCALE.SetEnabled(b); } else { _texture = null; PREVIEW.image = null; bool b = false; PREVIEW.SetEnabled(b); BUTTON_INVERT.SetEnabled(b); BUTTON_EDGES.SetEnabled(b); BUTTON_BOX_BLUR.SetEnabled(b); BUTTON_GAUSSIAN_BLUR.SetEnabled(b); BUTTON_GRAYSCALE.SetEnabled(b); } } ); } // add elemenets to root: rootVisualElement.Add( FIELD ); rootVisualElement.Add( PREVIEW ); rootVisualElement.Add( INVERT ); rootVisualElement.Add( EDGES ); rootVisualElement.Add( BOX_BLUR ); rootVisualElement.Add( GAUSSIAN_BLUR ); rootVisualElement.Add( GRAYSCALE ); } static void InvertColors ( Texture2D tex ) { #if DEBUG var stopwatch = System.Diagnostics.Stopwatch.StartNew(); #endif if( tex.format==TextureFormat.RGB24 ) { var rawdata = tex.GetRawTextureData<RGB24>(); new InvertRGB24Job { data = tex.GetRawTextureData<RGB24>() } .Schedule( rawdata.Length , tex.width ).Complete(); } else if( tex.format==TextureFormat.RGBA32 ) { var rawdata = tex.GetRawTextureData<RGBA32>(); new InvertRGBA32Job { data = tex.GetRawTextureData<RGBA32>() } .Schedule( rawdata.Length , tex.width ).Complete(); } else if( tex.format==TextureFormat.R8 || tex.format==TextureFormat.Alpha8 ) { var rawdata = tex.GetRawTextureData<byte>(); new InvertByteJob { data = tex.GetRawTextureData<byte>() } .Schedule( rawdata.Length , tex.width ).Complete(); } else if( tex.format==TextureFormat.R16 ) { var rawdata = tex.GetRawTextureData<ushort>(); new InvertR16Job { data = tex.GetRawTextureData<ushort>() } .Schedule( rawdata.Length , tex.width ).Complete(); } else if( tex.format==TextureFormat.RGB565 ) { var rawdata = tex.GetRawTextureData<RGB565>(); new InvertRGB565Job { data = tex.GetRawTextureData<RGB565>() } .Schedule( rawdata.Length , tex.width ).Complete(); } else throw new System.NotImplementedException($"{tex.format} processing not implemented"); #if DEBUG var timeJob = stopwatch.Elapsed.TotalMilliseconds; stopwatch.Restart(); #endif tex.Apply(); #if DEBUG var timeApply = stopwatch.Elapsed.TotalMilliseconds; Debug.Log($"{nameof(InvertColors)} took: {timeJob:0.00}ms + {timeApply:0.00}ms (job execution + tex.Apply)"); #endif } static void EdgeDetect ( Texture2D tex ) { #if DEBUG var stopwatch = System.Diagnostics.Stopwatch.StartNew(); #endif if( tex.format==TextureFormat.RGB24 ) { var rawdata = tex.GetRawTextureData<RGB24>(); new EdgeDetectRGB24Job( tex.GetRawTextureData<RGB24>() , tex.width ) .Schedule( rawdata.Length , tex.width ).Complete(); } else if( tex.format==TextureFormat.RGBA32 ) { var rawdata = tex.GetRawTextureData<RGBA32>(); new EdgeDetectRGBA32Job( tex.GetRawTextureData<RGBA32>() , tex.width ) .Schedule( rawdata.Length , tex.width ).Complete(); } else throw new System.NotImplementedException($"{tex.format} processing not implemented"); #if DEBUG var timeJob = stopwatch.Elapsed.TotalMilliseconds; stopwatch.Restart(); #endif tex.Apply(); #if DEBUG var timeApply = stopwatch.Elapsed.TotalMilliseconds; Debug.Log($"{nameof(EdgeDetect)} took: {timeJob:0.00}ms + {timeApply:0.00}ms (job execution + tex.Apply)"); #endif } static void BoxBlur ( Texture2D tex , int radius ) { #if DEBUG var stopwatch = System.Diagnostics.Stopwatch.StartNew(); #endif if( tex.format==TextureFormat.RGB24 ) { var rawdata = tex.GetRawTextureData<RGB24>(); new BoxBlurRGB24Job( tex.GetRawTextureData<RGB24>() , tex.width , tex.height , radius ) .Schedule().Complete(); } else if( tex.format==TextureFormat.RGBA32 ) { var rawdata = tex.GetRawTextureData<RGBA32>(); new BoxBlurRGBA32Job( tex.GetRawTextureData<RGBA32>() , tex.width , tex.height , radius ) .Schedule().Complete(); } else throw new System.NotImplementedException($"{tex.format} processing not implemented"); #if DEBUG var timeJob = stopwatch.Elapsed.TotalMilliseconds; stopwatch.Restart(); #endif tex.Apply(); #if DEBUG var timeApply = stopwatch.Elapsed.TotalMilliseconds; Debug.Log($"{nameof(BoxBlur)} took: {timeJob:0.00}ms + {timeApply:0.00}ms (job execution + tex.Apply)"); #endif } static void GaussianBlur ( Texture2D tex , int radius ) { #if DEBUG var stopwatch = System.Diagnostics.Stopwatch.StartNew(); #endif if( tex.format==TextureFormat.RGB24 ) { var rawdata = tex.GetRawTextureData<RGB24>(); new GaussianBlurRGB24Job( tex.GetRawTextureData<RGB24>() , tex.width , tex.height , radius ) .Schedule().Complete(); } else if( tex.format==TextureFormat.RGBA32 ) { var rawdata = tex.GetRawTextureData<RGBA32>(); new GaussianBlurRGBA32Job( tex.GetRawTextureData<RGBA32>() , tex.width , tex.height , radius ) .Schedule().Complete(); } else throw new System.NotImplementedException($"{tex.format} processing not implemented"); #if DEBUG var timeJob = stopwatch.Elapsed.TotalMilliseconds; stopwatch.Restart(); #endif tex.Apply(); #if DEBUG var timeApply = stopwatch.Elapsed.TotalMilliseconds; Debug.Log($"{nameof(GaussianBlur)} took: {timeJob:0.00}ms + {timeApply:0.00}ms (job execution + tex.Apply)"); #endif } static void Grayscale ( Texture2D tex ) { #if DEBUG var stopwatch = System.Diagnostics.Stopwatch.StartNew(); #endif if( tex.format==TextureFormat.RGB24 ) { var rawdata = tex.GetRawTextureData<RGB24>(); new GrayscaleRGB24Job { data = tex.GetRawTextureData<RGB24>() } .Schedule( rawdata.Length , tex.width ).Complete(); } else if( tex.format==TextureFormat.RGBA32 ) { var rawdata = tex.GetRawTextureData<RGBA32>(); new GrayscaleRGBA32Job { data = tex.GetRawTextureData<RGBA32>() } .Schedule( rawdata.Length , tex.width ).Complete(); } else throw new System.NotImplementedException($"{tex.format} processing not implemented"); #if DEBUG var timeJob = stopwatch.Elapsed.TotalMilliseconds; stopwatch.Restart(); #endif tex.Apply(); #if DEBUG var timeApply = stopwatch.Elapsed.TotalMilliseconds; Debug.Log($"{nameof(Grayscale)} took: {timeJob:0.00}ms + {timeApply:0.00}ms (job execution + tex.Apply)"); #endif } [UnityEditor.MenuItem("Test/Raw Texture Data/Processing Example")] static void CreateWindow () => UnityEditor.EditorWindow.GetWindow<RawTextureDataProcessingExamplesWindow>( nameof(RawTextureDataProcessingExamplesWindow) ).Show(); void SetupStyle ( VisualElement ve , int minHeight = 28 ) { var style = ve.style; style.borderTopWidth = style.borderLeftWidth = style.borderRightWidth = style.borderBottomWidth = 1; style.borderTopColor = style.borderLeftColor = style.borderRightColor = style.borderBottomColor = new Color{ a=0.5f }; style.paddingTop = style.paddingBottom = 4; style.paddingLeft = style.paddingRight = 8; style.minHeight = minHeight; } }
29.740181
164
0.693011
[ "MIT" ]
andrew-raphael-lukasik/RawTextureDataProcessingExamples
Editor/RawTextureDataProcessingExamplesWindow.cs
9,846
C#
using System; using System.Collections.Generic; namespace WebApplication.Models { public partial class SourceAndTargetSystemsJsonSchema { public string SystemType { get; set; } public string JsonSchema { get; set; } } }
20.833333
57
0.7
[ "MIT" ]
hboiled/azure-data-services-go-fast-codebase
solution/WebApplication/WebApplication/Models/SourceAndTargetSystemsJsonSchema.cs
252
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the robomaker-2018-06-29.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.RoboMaker.Model { /// <summary> /// Container for the parameters to the DeleteRobotApplication operation. /// Deletes a robot application. /// </summary> public partial class DeleteRobotApplicationRequest : AmazonRoboMakerRequest { private string _application; private string _applicationVersion; /// <summary> /// Gets and sets the property Application. /// <para> /// The Amazon Resource Name (ARN) of the the robot application. /// </para> /// </summary> [AWSProperty(Required=true, Min=1, Max=1224)] public string Application { get { return this._application; } set { this._application = value; } } // Check to see if Application property is set internal bool IsSetApplication() { return this._application != null; } /// <summary> /// Gets and sets the property ApplicationVersion. /// <para> /// The version of the robot application to delete. /// </para> /// </summary> [AWSProperty(Min=1, Max=255)] public string ApplicationVersion { get { return this._applicationVersion; } set { this._applicationVersion = value; } } // Check to see if ApplicationVersion property is set internal bool IsSetApplicationVersion() { return this._applicationVersion != null; } } }
30.56962
107
0.636439
[ "Apache-2.0" ]
ChristopherButtars/aws-sdk-net
sdk/src/Services/RoboMaker/Generated/Model/DeleteRobotApplicationRequest.cs
2,415
C#
using System.IO; using JsonLite.Ast; namespace Hypermedia.JsonApi.Tests { internal static class JsonContent { internal static JsonObject GetObject(string name) { using (var stream = File.OpenRead($"..\\..\\{name}.json")) { return (JsonObject)JsonLite.Json.CreateAst(stream); } } } }
23.25
70
0.564516
[ "MIT" ]
cosullivan/Hypermedia
Src/Hypermedia.JsonApi.Tests/Json.cs
374
C#
namespace SdlSharp.Touch { /// <summary> /// The type of a haptic effect. /// </summary> public enum HapticEffectType { /// <summary> /// Applies a constant force in the specified direction to the joystick. /// </summary> Constant, /// <summary> /// Sine wave-shaped effect. /// </summary> Sine, /// <summary> /// An effect that explicitly controls the large and small motors. /// </summary> LeftRight, /// <summary> /// Triangle wave-shaped effect. /// </summary> Triangle, /// <summary> /// Sawtooth up wave-shaped effect. /// </summary> SawToothUp, /// <summary> /// Sawtooth down wave-shaped effect. /// </summary> SawToothDown, /// <summary> /// A linear ramp effect. /// </summary> Ramp, /// <summary> /// An effect based on axes position. /// </summary> Spring, /// <summary> /// An effect based on axes velocity. /// </summary> Damper, /// <summary> /// An effect based on axes acceleration. /// </summary> Inertia, /// <summary> /// An effect based on axes movement. /// </summary> Friction, /// <summary> /// A custom effect. /// </summary> Custom } }
21.478261
80
0.464912
[ "MIT" ]
Ciastex/sdl-sharp
src/SdlSharp/Touch/HapticEffectType.cs
1,484
C#
using System.ComponentModel; using System.Drawing; using System.Windows.Forms; using DevExpress.XtraEditors; namespace Smart.Win.Controls { /// <summary> /// ButtonEdit控件 /// </summary> public class ButtonEditUC : ButtonEdit { /// <summary> /// 设置响应删除事件 /// </summary> private void SetCanDeleteValue() { if (CustomCanDeleteValue) { this.KeyDown += _buttonEdit_KeyDown; } else { this.KeyDown -= _buttonEdit_KeyDown; } } /// <summary> /// 设置是否可以选择样式 /// </summary> private void SetisSelectable() { if (CustomIsSelectable) { for (var i = 0; i < Properties.Buttons.Count; i++) { Properties.Buttons[i].Visible = true; } Properties.AppearanceReadOnly.BackColor = Color.White; Properties.AppearanceReadOnly.Options.UseBackColor = true; } else { for (var i = 0; i < Properties.Buttons.Count; i++) { Properties.Buttons[i].Visible = false; } Properties.AppearanceReadOnly.Options.UseBackColor = false; } } /// <summary> /// 值得样式 /// </summary> private void SetValueStyle() { if (CustomUseDeleteStyle) { Properties.Appearance.ForeColor = Color.Red; Properties.Appearance.Font = new Font("宋体", 9F, FontStyle.Strikeout, GraphicsUnit.Point, 134); Properties.Appearance.Options.UseFont = true; Properties.Appearance.Options.UseForeColor = true; } else { Properties.Appearance.ForeColor = Color.Black; Properties.Appearance.Font = new Font("宋体", 9F, FontStyle.Regular, GraphicsUnit.Point, 134); Properties.Appearance.Options.UseFont = false; Properties.Appearance.Options.UseForeColor = false; } } /// <summary> /// 删除 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void _buttonEdit_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Delete) { this.Tag = null; this.Text = string.Empty; } } private bool _CustomUseDeleteStyle; /// <summary> /// 选中的对象是否使用删除样式 /// </summary> [DXCategory("Custom")] [Description("选中的对象是否使用删除样式。")] public bool CustomUseDeleteStyle { get { return _CustomUseDeleteStyle; } set { _CustomUseDeleteStyle = value; SetValueStyle(); } } private bool _CustomCanDeleteValue; /// <summary> /// 按键Delete清楚选择值是否可用 /// </summary> [DXCategory("Custom")] [Description("按键Delete清楚选择值是否可用。")] public bool CustomCanDeleteValue { get { return _CustomCanDeleteValue; } set { _CustomCanDeleteValue = value; SetCanDeleteValue(); } } private bool _CustomIsSelectable; /// <summary> /// 选择按钮是否可用,双击文本框是否可用 /// </summary> [DXCategory("Custom")] [Description("选择按钮是否可用,双击文本框是否可用。")] public bool CustomIsSelectable { get { return _CustomIsSelectable; } set { _CustomIsSelectable = value; SetisSelectable(); } } } }
28.701493
110
0.48986
[ "Apache-2.0" ]
chartsoft/SmartPublic
AppPublic/Smart.Win/Controls/ButtonEditUC.cs
4,082
C#
// ------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. // ------------------------------------------------------------------------------ // **NOTE** This file was generated by a tool and any changes will be overwritten. // <auto-generated/> // Template Source: Templates\CSharp\Requests\EntityCollectionPage.cs.tt namespace Microsoft.Graph { using System; /// <summary> /// The type WorkbookWorksheetTablesCollectionPage. /// </summary> public partial class WorkbookWorksheetTablesCollectionPage : CollectionPage<WorkbookTable>, IWorkbookWorksheetTablesCollectionPage { /// <summary> /// Gets the next page <see cref="IWorkbookWorksheetTablesCollectionRequest"/> instance. /// </summary> public IWorkbookWorksheetTablesCollectionRequest NextPageRequest { get; private set; } /// <summary> /// Initializes the NextPageRequest property. /// </summary> public void InitializeNextPageRequest(IBaseClient client, string nextPageLinkString) { if (!string.IsNullOrEmpty(nextPageLinkString)) { this.NextPageRequest = new WorkbookWorksheetTablesCollectionRequest( nextPageLinkString, client, null); } } } }
38.564103
153
0.587101
[ "MIT" ]
OfficeGlobal/msgraph-beta-sdk-dotnet
src/Microsoft.Graph/Requests/Generated/WorkbookWorksheetTablesCollectionPage.cs
1,504
C#
// CodeContracts // // Copyright (c) Microsoft Corporation // // All rights reserved. // // MIT License // // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:2.0.50727.3074 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ namespace PostMSI.Properties { using System; /// <summary> /// A strongly-typed resource class, for looking up localized strings, etc. /// </summary> // This class was auto-generated by the StronglyTypedResourceBuilder // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { private static global::System.Resources.ResourceManager resourceMan; private static global::System.Globalization.CultureInfo resourceCulture; [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal Resources() { } /// <summary> /// Returns the cached ResourceManager instance used by this class. /// </summary> [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("PostMSI.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; } } /// <summary> /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// </summary> [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } /// <summary> /// Looks up a localized string similar to Hello, I&apos;m a localized string. /// </summary> internal static string ResourceTest { get { return ResourceManager.GetString("ResourceTest", resourceCulture); } } } }
48.735632
463
0.650943
[ "MIT" ]
Acidburn0zzz/CodeContracts
Microsoft.Research/RegressionTest/PostMSI/PostMSIApp1/Properties/Resources.Designer.cs
4,240
C#
// <copyright file="AssemblyContentManager.cs" company="natsnudasoft"> // Copyright (c) Adrian John Dunstan. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // </copyright> namespace Natsnudasoft.EgamiFlowScreensaver { using System; using System.IO; using System.Reflection; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Content; using Natsnudasoft.NatsnudaLibrary; /// <summary> /// Defines a content manager which will load content from embedded resources within a specified /// <see cref="Assembly"/>. /// </summary> /// <seealso cref="ContentManager" /> public class AssemblyContentManager : ContentManager { private readonly Assembly contentAssembly; /// <summary> /// Initializes a new instance of the <see cref="AssemblyContentManager"/> class. /// </summary> /// <param name="contentAssembly">The assembly to retrieve embedded content from.</param> /// <param name="serviceProvider">The service provider for the currently running /// <see cref="Game"/>.</param> /// <exception cref="ArgumentNullException"><paramref name="contentAssembly"/> is /// <see langword="null"/>.</exception> public AssemblyContentManager(Assembly contentAssembly, IServiceProvider serviceProvider) : base(serviceProvider) { ParameterValidation.IsNotNull(contentAssembly, nameof(contentAssembly)); this.contentAssembly = contentAssembly; } /// <summary> /// Initializes a new instance of the <see cref="AssemblyContentManager"/> class. /// </summary> /// <param name="contentAssembly">The assembly to retrieve embedded content from.</param> /// <param name="serviceProvider">The service provider for the currently running /// <see cref="Game"/>.</param> /// <param name="rootDirectory">The root directory to search for content within the /// specified assembly.</param> /// <exception cref="ArgumentNullException"><paramref name="contentAssembly"/> is /// <see langword="null"/>.</exception> public AssemblyContentManager( Assembly contentAssembly, IServiceProvider serviceProvider, string rootDirectory) : base(serviceProvider, rootDirectory) { ParameterValidation.IsNotNull(contentAssembly, nameof(contentAssembly)); this.contentAssembly = contentAssembly; } /// <inheritdoc/> /// <exception cref="ArgumentNullException"><paramref name="assetName"/> is /// <see langword="null"/>.</exception> /// <exception cref="ArgumentException"><paramref name="assetName"/> is /// empty.</exception> /// <exception cref="ContentLoadException">The embedded content file could not be found, or /// the embedded content file could not be loaded.</exception> protected override Stream OpenStream(string assetName) { ParameterValidation.IsNotNull(assetName, nameof(assetName)); ParameterValidation.IsNotEmpty(assetName, nameof(assetName)); try { var embeddedAssetPath = Path.Combine(this.RootDirectory, assetName) + ".xnb"; embeddedAssetPath = ConvertPathToEmbeddedResourcePath(embeddedAssetPath); return this.contentAssembly .GetManifestResourceStream(typeof(AssemblyContentManager), embeddedAssetPath); } catch (FileLoadException ex) { throw new ContentLoadException( "The embedded content file could not be loaded.", ex); } catch (FileNotFoundException ex) { throw new ContentLoadException("The embedded content file was not found.", ex); } catch (Exception ex) { throw new ContentLoadException("Embedded content stream error.", ex); } } private static string ConvertPathToEmbeddedResourcePath(string path) { var embeddedResourcePath = path.Replace('\\', '.'); embeddedResourcePath = embeddedResourcePath.Replace('/', '.'); embeddedResourcePath = embeddedResourcePath.Replace(Path.PathSeparator, '.'); return embeddedResourcePath; } } }
43.504348
100
0.640416
[ "Apache-2.0" ]
natsnudasoft/EgamiFlowScreensaver
src/EgamiFlowScreensaver/AssemblyContentManager.cs
5,005
C#
using NicoV3.Common; using WpfUtilV1.Mvvm.Service; using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Text; using System.Text.RegularExpressions; using System.Threading.Tasks; using WpfUtilV1.Common; namespace NicoV3.Mvvm.Model { public class LoginModel : HttpModel { /// <summary> /// シングルトンパターンのため、プライベートコンストラクタ。 /// </summary> private LoginModel() { this.Method = "POST"; this.ContentType = "application/x-www-form-urlencoded"; } /// <summary> /// LoginModelインスタンスを取得します。 /// </summary> public static LoginModel Instance { get; private set; } = new LoginModel(); /// <summary> /// ログインしているかどうか /// </summary> public bool IsLogin { get { return _IsLogin; } set { SetProperty(ref _IsLogin, value); } } private bool _IsLogin = false; /// <summary> /// プレミアムかどうか /// </summary> public bool IsPremium { get { return _IsPremium; } set { SetProperty(ref _IsPremium, value); } } private bool _IsPremium = false; /// <summary> /// プレミアムかどうか /// </summary> public string Token { get { if (LastTokenGetDate.AddMinutes(10).Ticks < DateTime.Now.Ticks) { // 10分経過毎にトークンを更新する。 _Token = GetToken(); //LastTokenGetDate = DateTime.Now; } return _Token; } } private string _Token = default(string); public DateTime LastTokenGetDate { get { return _LastTokenGetDate; } set { SetProperty(ref _LastTokenGetDate, value); } } private DateTime _LastTokenGetDate = default(DateTime); /// <summary> /// クッキーコンテナ /// </summary> public CookieContainer Cookie { get { return _Cookie; } set { SetProperty(ref _Cookie, value); } } private CookieContainer _Cookie = new CookieContainer(); /// <summary> /// 規定のユーザ、パスワードを用いて、ログイン処理を実行します。 /// </summary> /// <remarks>既にログイン済みの場合は中断します。</remarks> public void Login() { if (IsLogin) { // ログイン済みの場合は中断 return; } // ログイン処理 Login(Variables.MailAddress, Variables.Password); } /// <summary> /// 指定したユーザ、パスワードを用いて、ログイン処理を実行します。 /// </summary> /// <param name="mail">メールアドレス</param> /// <param name="password">パスワード</param> /// <remarks>既にログイン済みの場合もログインし直します。</remarks> public void Login(string mail, string password) { // ログインテスト前にプロパティを初期化する。 Initialize(); if (string.IsNullOrWhiteSpace(mail) || string.IsNullOrWhiteSpace(password)) { // ログイン情報が指定されていない場合は中断 ServiceFactory.MessageService.Error("ログイン情報が入力されていません。"); return; } try { // リクエストを取得する。 var req = GetRequest(Constants.LoginUrl, ToLoginParameter(mail, password)); var res = GetResponse(req, false); // リクエストからクッキー取得 CookieCollection cookies = req.CookieContainer.GetCookies(req.RequestUri); // レスポンスを用いてログイン処理を実行する。 if (LoginWithResponse(HttpUtil.GetResponseString(res))) { // ログインが成功したら、ログイン情報を保存する。 Variables.MailAddress = mail; Variables.Password = password; // 取得したクッキーをIEに流用 HttpUtil.InternetSetCookie(Constants.CookieUrl, cookies); // 自身のクッキーコンテナに追加 Cookie.Add(cookies); } } catch (Exception ex) { Console.WriteLine(ex.ToString()); // TODO Initialize(); ServiceFactory.MessageService.Error("何らかの原因でエラーが発生しました。"); } } /// <summary> /// レスポンスを用いてログイン処理を実行します。 /// </summary> /// <param name="expression">レスポンスデータ</param> /// <returns>ログイン成功:true / 失敗:false</returns> private bool LoginWithResponse(string expression) { ServiceFactory.MessageService.Debug(expression); if (expression.Contains("メールアドレスまたはパスワードが間違っています")) { ServiceFactory.MessageService.Error("入力されたログイン情報が間違っています。"); } else if (expression.Contains("closed=1&")) { ServiceFactory.MessageService.Error("入力されたアカウント情報が間違っています。"); } else if (expression.Contains("error=access_locked")) { ServiceFactory.MessageService.Error("連続アクセス検出のためアカウントロック中\r\nしばらく時間を置いてから試行してください。"); } else if (expression.Contains("is_premium=0&") || expression.Contains("is_premium=1&")) { // ログイン成功 // ログインフラグを立てる。 IsLogin = true; IsPremium = expression.Contains("is_premium=1&"); return true; } else { ServiceFactory.MessageService.Error("何らかの原因でログインできませんでした\r\nしばらく時間を置いてから試行してください。"); } return false; } /// <summary> /// プロパティを初期化します。 /// </summary> private void Initialize() { IsLogin = false; IsPremium = false; Cookie = null; Cookie = new CookieContainer(); } private string GetToken() { var txt = GetSmileVideoHtmlText(Constants.TokenUrl); return Regex.Match(txt, "data-csrf-token=\"(?<token>[^\"]+)\"").Groups["token"].Value; } /// <summary> /// ログインパラメータに変換します。 /// </summary> /// <param name="mailaddress">メールアドレス</param> /// <param name="password">パスワード</param> /// <returns></returns> private string ToLoginParameter(string mailaddress, string password) { return string.Format( Constants.LoginParameter, HttpUtil.ToUrlEncode(mailaddress), HttpUtil.ToUrlEncode(password) ); } } }
30.244344
101
0.512717
[ "MIT" ]
twinbird827/NicoV3
Mvvm/Model/LoginModel.cs
8,056
C#
using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; namespace Chapter13CardLib { public class Deck : ICloneable { public event EventHandler LastCardDrawn; private Cards cards = new Cards(); public Deck() { for (int suitVal = 0; suitVal < 4; suitVal++) { for (int rankVal = 1; rankVal < 14; rankVal++) { cards.Add(new Card((Suit)suitVal, (Rank)rankVal)); } } } private Deck(Cards newCards) { cards = newCards; } /// <summary> /// Nondefault constructor. Allows aces to be set high. /// </summary> public Deck(bool isAceHigh) : this() { Card.isAceHigh = isAceHigh; } /// <summary> /// Nondefault constructor. Allows a trump suit to be used. /// </summary> public Deck(bool useTrumps, Suit trump) : this() { Card.useTrumps = useTrumps; Card.trump = trump; } /// <summary> /// Nondefault constructor. Allows aces to be set high and a trump suit /// to be used. /// </summary> public Deck(bool isAceHigh, bool useTrumps, Suit trump) : this() { Card.isAceHigh = isAceHigh; Card.useTrumps = useTrumps; Card.trump = trump; } public Card GetCard(int cardNum) { if (cardNum >= 0 && cardNum <= 51) { if ((cardNum == 51) && (LastCardDrawn != null)) LastCardDrawn(this, EventArgs.Empty); return cards[cardNum]; } else throw new CardOutOfRangeException(cards.Clone() as Cards); //throw (new System.ArgumentOutOfRangeException("cardNum", CardNum, "Value must be between 0 and 51.")); } public void Shuffle() { Cards newDeck = new Cards(); bool[] assigned = new bool[52]; Random sourceGen = new Random(); for (int i = 0; i < 52; i++) { int sourceCard = 0; bool foundCard = false; while (foundCard == false) { sourceCard = sourceGen.Next(52); if (assigned[sourceCard] == false) foundCard = true; } assigned[sourceCard] = true; newDeck.Add(cards[sourceCard]); } newDeck.CopyTo(cards); } public object Clone() { Deck newDeck = new Deck(cards.Clone() as Cards); return newDeck; } } }
30.433962
124
0.420955
[ "MIT" ]
laoling/C-sharp-note-StepByStep
Projects/Chapter13CardLib/Chapter13CardLib/Deck.cs
3,228
C#
// Copyright (c) 2019 Jon P Smith, GitHub: JonPSmith, web: http://www.thereformedprogrammer.net/ // Licensed under MIT license. See License.txt in the project root for license information. using System; using System.Collections.Generic; using System.Collections.Immutable; using Microsoft.EntityFrameworkCore; using StatusGeneric; namespace GenericEventRunner.ForSetup { /// <summary> /// Definition of the properties etc. for configuring how the EventsRunner works /// </summary> public interface IGenericEventRunnerConfig { /// <summary> /// This limits the number of times it will look for new events from the BeforeSave events. /// This stops circular sets of events /// The event runner will throw an exception if the BeforeSave loop goes round move than this number. /// </summary> int MaxTimesToLookForBeforeEvents { get; } /// <summary> /// If this is set to true, then the DuringSave event handlers aren't used /// NOTE: This is set to true if the RegisterGenericEventRunner doesn't find any DuringSave event handlers /// </summary> bool NotUsingDuringSaveHandlers { get; set; } /// <summary> /// If this is set to true, then the AfterSave event handlers aren't used /// NOTE: This is set to true if the RegisterGenericEventRunner doesn't find any AfterSave event handlers /// </summary> bool NotUsingAfterSaveHandlers { get; set; } /// <summary> /// If true (which is the default value) then the first BeforeSave event handler that returns an error will stop the event runner. /// The use cases for each setting is: /// true: Once you have a error, then its not worth going on so stopping quickly is good. /// false: If your events have a lot of different checks then this setting gets all the possible errors. /// NOTE: Because this is very event-specific you can override this on a per-handler basis via the EventHandlerConfig Attribute /// </summary> bool StopOnFirstBeforeHandlerThatHasAnError { get; } /// <summary> /// Add a method which should be executed after ChangeTracker.DetectChanges() has been run for the given DbContext /// This is useful to add code that uses the State of entities to /// NOTES: /// - DetectChanges won't be called again, so you must ensure that an changes must be manually applied. /// - The BeforeSaveEvents will be run before this action is called /// </summary> /// <typeparam name="TContext">Must be a DbContext that uses the GenericEventRunner</typeparam> /// <param name="runAfterDetectChanges"></param> void AddActionToRunAfterDetectChanges<TContext>(Action<DbContext> runAfterDetectChanges) where TContext : DbContext; /// <summary> /// This method allows you to register an exception handler for a specific DbContext type /// When SaveChangesWithValidation is called if there is an exception then this method is called (if present) /// a) If it returns null then the error is rethrown. This means the exception handler can't handle that exception. /// b) If it returns a status with errors then those are combined into the GenericEventRunner status. /// c) If it returns a valid status (i.e. no errors) then it calls SaveChanges again, still with exception capture. /// Item b) is useful for turning SQL errors into user-friendly error message, and c) is good for handling a DbUpdateConcurrencyException /// </summary> void RegisterSaveChangesExceptionHandler<TContext>( Func<Exception, DbContext, IStatusGeneric> exceptionHandler) where TContext : DbContext; /// <summary> /// This holds the list of actions to be run after DetectChanges is called, but before SaveChanges is called /// NOTE: The BeforeSaveEvents will be run before these actions /// </summary> public IReadOnlyList<(Type dbContextType, Action<DbContext> action)> ActionsToRunAfterDetectChanges { get; } /// <summary> /// This holds the Dictionary of exception handlers for a specific DbContext /// </summary> ImmutableDictionary<Type, Func<Exception, DbContext, IStatusGeneric>> ExceptionHandlerDictionary { get; } } }
55.924051
145
0.687189
[ "MIT" ]
benmccallum/EfCore.GenericEventRunner
GenericEventRunner/ForSetup/IGenericEventRunnerConfig.cs
4,420
C#
using CommandLine; using CommandLine.Text; namespace LogConverter.Operations { public class AllOperations { [VerbOption("convert", HelpText = "Convert compact JSON formatted structured log to old txt format.")] public ConvertOptions ConvertVerb { get; set; } [VerbOption("install", HelpText = "Install windows explorer extension, that provide log convertation by context menu.")] public InstallOptions InstallVerb { get; set; } [VerbOption("unistall", HelpText = "Install windows explorer extension.")] public UnistallOptions UnistallVerb { get; set; } [HelpVerbOption] public string DoHelpForVerb(string verbName) { var help = HelpText.AutoBuild(this, verbName); help.Copyright = "Vladimir Rogozhin 2018"; return help; } } }
33.038462
128
0.66007
[ "MIT" ]
V0v1kkk/StructuredLogsConverter
src/LogConverter/Operations/AllOperations.cs
861
C#
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using System.Windows; namespace MetroRadiance.Interop.Win32 { public static class NativeExtensions { public static ushort ToLoWord(this IntPtr dword) { return (ushort)((uint)dword & 0xffff); } public static ushort ToHiWord(this IntPtr dword) { return (ushort)((uint)dword >> 16); } public static Point ToPoint(this IntPtr dword) { return new Point((short)((uint)dword & 0xffff), (short)((uint)dword >> 16)); } } }
23.518519
88
0.607874
[ "MIT" ]
Grabacr07/ResinTimer
src/MetroRadiance/MetroRadiance.Core/Interop/Win32/NativeExtensions.cs
637
C#
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** using System; using System.Collections.Generic; using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; namespace Pulumi.Aws.Ecs.Inputs { public sealed class ServiceDeploymentCircuitBreakerArgs : Pulumi.ResourceArgs { /// <summary> /// Whether to enable the deployment circuit breaker logic for the service. /// </summary> [Input("enable", required: true)] public Input<bool> Enable { get; set; } = null!; /// <summary> /// Whether to enable Amazon ECS to roll back the service if a service deployment fails. If rollback is enabled, when a service deployment fails, the service is rolled back to the last deployment that completed successfully. /// </summary> [Input("rollback", required: true)] public Input<bool> Rollback { get; set; } = null!; public ServiceDeploymentCircuitBreakerArgs() { } } }
35.3125
232
0.669027
[ "ECL-2.0", "Apache-2.0" ]
RafalSumislawski/pulumi-aws
sdk/dotnet/Ecs/Inputs/ServiceDeploymentCircuitBreakerArgs.cs
1,130
C#
using System; using Android.App; using Android.Content.PM; using Android.Runtime; using Android.Views; using Android.Widget; using Android.OS; namespace AppEmailParaVoce.Droid { [Activity(Label = "AppEmailParaVoce", Icon = "@mipmap/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)] public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity { protected override void OnCreate(Bundle savedInstanceState) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(savedInstanceState); Xamarin.Essentials.Platform.Init(this, savedInstanceState); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); LoadApplication(new App()); } public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Android.Content.PM.Permission[] grantResults) { Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults); base.OnRequestPermissionsResult(requestCode, permissions, grantResults); } } }
38.878788
191
0.717069
[ "MIT" ]
dfilitto/ProjetosXamarinForms
AppEmailParaVoce/AppEmailParaVoce/AppEmailParaVoce.Android/MainActivity.cs
1,285
C#
using System.Runtime.Serialization; namespace InnerCore.Api.DeConz.Models.Bridge { public enum UpdateChannel { [EnumMember(Value = "stable")] Stable, [EnumMember(Value = "alpha")] Alpha, [EnumMember(Value = "beta")] Beta, } }
19.2
44
0.583333
[ "MIT" ]
Denifia/InnerCore.Api.DeConz
InnerCore.Api.DeConz/Models/Bridge/UpdateChannel.cs
290
C#
namespace FormulaEdit.UI_Elements.Script_Action_Editors { partial class ScriptActionControlListRemove { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Component Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.FilterConditionTextBox = new System.Windows.Forms.TextBox(); this.ScriptableComboBox = new System.Windows.Forms.ComboBox(); this.OriginListComboBox = new System.Windows.Forms.ComboBox(); this.LabelScriptable = new System.Windows.Forms.Label(); this.LabelList = new System.Windows.Forms.Label(); this.LabelFilter = new System.Windows.Forms.Label(); this.SuspendLayout(); // // FilterConditionTextBox // this.FilterConditionTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.FilterConditionTextBox.Location = new System.Drawing.Point(65, 57); this.FilterConditionTextBox.Name = "FilterConditionTextBox"; this.FilterConditionTextBox.Size = new System.Drawing.Size(252, 20); this.FilterConditionTextBox.TabIndex = 0; // // ScriptableComboBox // this.ScriptableComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.ScriptableComboBox.FormattingEnabled = true; this.ScriptableComboBox.Location = new System.Drawing.Point(65, 3); this.ScriptableComboBox.Name = "ScriptableComboBox"; this.ScriptableComboBox.Size = new System.Drawing.Size(252, 21); this.ScriptableComboBox.TabIndex = 1; // // OriginListComboBox // this.OriginListComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.OriginListComboBox.FormattingEnabled = true; this.OriginListComboBox.Location = new System.Drawing.Point(65, 30); this.OriginListComboBox.Name = "OriginListComboBox"; this.OriginListComboBox.Size = new System.Drawing.Size(252, 21); this.OriginListComboBox.TabIndex = 2; // // LabelScriptable // this.LabelScriptable.AutoSize = true; this.LabelScriptable.Location = new System.Drawing.Point(18, 6); this.LabelScriptable.Name = "LabelScriptable"; this.LabelScriptable.Size = new System.Drawing.Size(41, 13); this.LabelScriptable.TabIndex = 3; this.LabelScriptable.Text = "Object:"; // // LabelList // this.LabelList.AutoSize = true; this.LabelList.Location = new System.Drawing.Point(33, 33); this.LabelList.Name = "LabelList"; this.LabelList.Size = new System.Drawing.Size(26, 13); this.LabelList.TabIndex = 4; this.LabelList.Text = "List:"; // // LabelFilter // this.LabelFilter.AutoSize = true; this.LabelFilter.Location = new System.Drawing.Point(27, 60); this.LabelFilter.Name = "LabelFilter"; this.LabelFilter.Size = new System.Drawing.Size(32, 13); this.LabelFilter.TabIndex = 5; this.LabelFilter.Text = "Filter:"; // // ScriptActionControlListRemove // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.LabelFilter); this.Controls.Add(this.LabelList); this.Controls.Add(this.LabelScriptable); this.Controls.Add(this.OriginListComboBox); this.Controls.Add(this.ScriptableComboBox); this.Controls.Add(this.FilterConditionTextBox); this.Name = "ScriptActionControlListRemove"; this.Size = new System.Drawing.Size(320, 91); this.ResumeLayout(false); this.PerformLayout(); } #endregion private System.Windows.Forms.TextBox FilterConditionTextBox; private System.Windows.Forms.ComboBox ScriptableComboBox; private System.Windows.Forms.ComboBox OriginListComboBox; private System.Windows.Forms.Label LabelScriptable; private System.Windows.Forms.Label LabelList; private System.Windows.Forms.Label LabelFilter; } }
45.885246
168
0.611826
[ "BSD-3-Clause" ]
apoch/formula-engine
FormulaEdit/FormulaEdit/UI Elements/Script Action Editors/ScriptActionControlListRemove.Designer.cs
5,600
C#
// <copyright file="BmpEncoderTests.cs" company="James Jackson-South"> // Copyright (c) James Jackson-South and contributors. // Licensed under the Apache License, Version 2.0. // </copyright> using ImageSharp.Formats; namespace ImageSharp.Tests { using Xunit; public class BmpEncoderTests : FileTestBase { public static readonly TheoryData<BmpBitsPerPixel> BitsPerPixel = new TheoryData<BmpBitsPerPixel> { BmpBitsPerPixel.Pixel24, BmpBitsPerPixel.Pixel32 }; [Theory] [MemberData(nameof(BitsPerPixel))] public void BitmapCanEncodeDifferentBitRates(BmpBitsPerPixel bitsPerPixel) { string path = this.CreateOutputDirectory("Bmp"); foreach (TestFile file in Files) { string filename = file.GetFileNameWithoutExtension(bitsPerPixel); using (Image image = file.CreateImage()) { image.Save($"{path}/{filename}.bmp", new BmpEncoderOptions { BitsPerPixel = bitsPerPixel }); } } } } }
30.405405
112
0.611556
[ "Apache-2.0" ]
ststeiger/ImageSharpTestApplication
tests/ImageSharp.Tests/Formats/Bmp/BmpEncoderTests.cs
1,127
C#
using System; namespace Demo { public static class Constants { public static string AlertButtonText = "Cancel"; } }
11.272727
50
0.717742
[ "MIT" ]
chrisriesgo/making-mobile-click
Demo/Constants.cs
126
C#
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace TradeAndTravel { public class Armor : Item { const int GeneralArmorValue = 5; public Armor(string name, Location location = null) : base(name, Armor.GeneralArmorValue, ItemType.Armor, location) { } public static List<ItemType> GetComposingItems() { return new List<ItemType>() { ItemType.Iron }; } } }
21.478261
75
0.617409
[ "Apache-2.0" ]
iliantrifonov/TelerikAcademy
OOP/ExamPreparation/2.TradeAndTravel/TradeAndTravel-MySolution/TradeAndTravel/Armor.cs
496
C#
using MvvmHelpers; using System; using System.Collections.Generic; using System.ComponentModel; using System.Text; namespace AtividadesVeiculoColeta.ViewModels { public class NovoVeiculoViewModel : ObservableObject { public NovoVeiculoViewModel() { } private string _nome; public string Nome { get { return _nome; } set { SetProperty(ref _nome, value); } } private string _placa; public string Placa { get { return _placa; } set { SetProperty(ref _placa, value); } } } }
17.840909
56
0.464968
[ "MIT" ]
perfeito/AtividadesVeiculoColeta
src/AtividadesVeiculoColeta/AtividadesVeiculoColeta/ViewModels/NovoVeiculoViewModel.cs
787
C#
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using Xunit; namespace System.Windows.Forms.Tests { public class SplitContainerTests : IClassFixture<ThreadExceptionFixture> { [WinFormsFact] public void SplitContainer_Constructor() { using var sc = new SplitContainer(); Assert.NotNull(sc); Assert.NotNull(sc.Panel1); Assert.Equal(sc, sc.Panel1.Owner); Assert.NotNull(sc.Panel2); Assert.Equal(sc, sc.Panel2.Owner); Assert.False(sc.SplitterRectangle.IsEmpty); } } }
30.04
76
0.644474
[ "MIT" ]
Amy-Li03/winforms
src/System.Windows.Forms/tests/UnitTests/SplitContainerTests.cs
753
C#
namespace SKIT.FlurlHttpClient.ByteDance.TikTok.Models { /// <summary> /// <para>表示 [GET] /data/external/poi/user 接口的请求。</para> /// </summary> public class DataExternalPOIUserRequest : TikTokRequest { /// <summary> /// 获取或设置 POI ID。 /// </summary> [Newtonsoft.Json.JsonIgnore] [System.Text.Json.Serialization.JsonIgnore] public string POIId { get; set; } = string.Empty; /// <summary> /// 获取或设置日期类型。 /// </summary> [Newtonsoft.Json.JsonIgnore] [System.Text.Json.Serialization.JsonIgnore] public int DateType { get; set; } } }
28.173913
60
0.580247
[ "MIT" ]
JohnZhaoXiaoHu/DotNetCore.SKIT.FlurlHttpClient.ByteDance
src/SKIT.FlurlHttpClient.ByteDance.TikTok/Models/DataExternalPOI/DataExternalPOIUserRequest.cs
698
C#
using System; using Newtonsoft.Json; namespace TownSuite.Web.SSV3Facade { public partial class RootInfo { [JsonProperty("swagger")] public string Swagger { get; set; } [JsonProperty("info")] public Info Info { get; set; } [JsonProperty("host")] public string Host { get; set; } [JsonProperty("basePath")] public string BasePath { get; set; } [JsonProperty("schemes")] public string[] Schemes { get; set; } [JsonProperty("paths")] public IDictionary<string, object> Paths { get; set; } [JsonProperty("definitions")] public IDictionary<string, object> Definitions { get; set; } } public partial class Info { [JsonProperty("title")] public string Title { get; set; } [JsonProperty("description")] public string Description { get; set; } [JsonProperty("version")] public string Version { get; set; } } public partial class ServiceEndPoint { [JsonProperty("post")] public Post PostData { get; set; } } public partial class Post { [JsonProperty("summary")] public string Summary { get; set; } [JsonProperty("parameters")] public RequestBody2[] Parameters { get; set; } [JsonProperty("consumes")] public string[] Consumes { get; set; } [JsonProperty("description")] public string Description { get; set; } [JsonProperty("produces")] public string[] Produces { get; set; } [JsonProperty("responses")] public Responses Responses { get; set; } } public partial class Responses { [JsonProperty("200")] public The200 The200 { get; set; } } public partial class The200 { [JsonProperty("description")] public string Description { get; set; } [JsonProperty("schema")] public Schema Schema { get; set; } } public partial class RequestBody2 { [JsonProperty("in")] public string In { get; set; } [JsonProperty("name")] public string Name { get; set; } [JsonProperty("description")] public string Description { get; set; } [JsonProperty("schema")] public Schema Schema { get; set; } } public partial class RequestBody { [JsonProperty("content")] public Content Content { get; set; } } public partial class Content { [JsonProperty("application/json")] public ApplicationJson ApplicationJson { get; set; } } public partial class ApplicationJson { [JsonProperty("schema")] public Schema Schema { get; set; } } public partial class Schema { [JsonProperty("type")] public string Type { get; set; } [JsonProperty("properties")] public IDictionary<string, object> Properties { get; set; } } }
22.885496
68
0.574049
[ "BSD-3-Clause" ]
TownSuite/TownSuite.Web.SSV3Facade
TownSuite.Web.SSV3Facade/SwaggerHelpers.cs
3,000
C#
// Copyright (c) 2013-2015 Robert Rouhani <robert.rouhani@gmail.com> and other contributors (see CONTRIBUTORS file). // Licensed under the MIT License - https://raw.github.com/Robmaister/SharpNav/master/LICENSE using System; using System.Collections.Generic; using SharpNav.Geometry; #if MONOGAME using Vector3 = Microsoft.Xna.Framework.Vector3; #elif OPENTK using Vector3 = OpenTK.Vector3; #elif SHARPDX using Vector3 = SharpDX.Vector3; #endif namespace SharpNav { /// <summary> /// The class of Poly mesh. /// </summary> public class PolyMesh { public const int NullId = -1; private const int DiagonalFlag = unchecked((int)0x80000000); private const int NeighborEdgeFlag = unchecked((int)0x80000000); private PolyVertex[] vertices; private Polygon[] polygons; private int numVertsPerPoly; //copied data from CompactHeightfield private BBox3 bounds; private float cellSize; private float cellHeight; private int borderSize; //HACK borderSize is 0 here. Fix with borderSize. /// <summary> /// Initializes a new instance of the <see cref="PolyMesh"/> class. /// </summary> /// <param name="contSet">The <see cref="ContourSet"/> to generate polygons from.</param> /// <param name="settings">The settings to build with.</param> public PolyMesh(ContourSet contSet, NavMeshGenerationSettings settings) : this(contSet, settings.CellSize, settings.CellHeight, 0, settings.VertsPerPoly) { } /// <summary> /// Initializes a new instance of the <see cref="PolyMesh"/> class by creating polygons from contours. /// </summary> /// <param name="contSet">The <see cref="ContourSet"/> to generate polygons from.</param> /// <param name="cellSize">The size of one voxel/cell.</param> /// <param name="cellHeight">The height of one voxel/cell.</param> /// <param name="borderSize">The size of the border around the mesh.</param> /// <param name="numVertsPerPoly">The maximum number of vertices per polygon.</param> public PolyMesh(ContourSet contSet, float cellSize, float cellHeight, int borderSize, int numVertsPerPoly) { //copy contour data this.bounds = contSet.Bounds; this.cellSize = cellSize; this.cellHeight = cellHeight; this.borderSize = borderSize; //get maximum limits int maxVertices, maxTris, maxVertsPerCont; contSet.GetVertexLimits(out maxVertices, out maxTris, out maxVertsPerCont); //initialize the mesh members var verts = new List<PolyVertex>(maxVertices); var polys = new List<Polygon>(maxTris); Queue<int> vertRemoveQueue = new Queue<int>(maxVertices); this.numVertsPerPoly = numVertsPerPoly; int[] mergeTemp = new int[numVertsPerPoly]; var vertDict = new Dictionary<PolyVertex, int>(new PolyVertex.RoughYEqualityComparer(2)); int[] indices = new int[maxVertsPerCont]; //keep track of vertex hash codes Triangle[] tris = new Triangle[maxVertsPerCont]; List<Polygon> contPolys = new List<Polygon>(maxVertsPerCont + 1); //extract contour data foreach (Contour cont in contSet) { //skip null contours if (cont.IsNull) continue; PolyVertex[] vertices = new PolyVertex[cont.Vertices.Length]; //triangulate contours for (int i = 0; i < cont.Vertices.Length; i++) { var cv = cont.Vertices[i]; vertices[i] = new PolyVertex(cv.X, cv.Y, cv.Z); indices[i] = i; } //Form triangles inside the area bounded by the contours int ntris = Triangulate(cont.Vertices.Length, vertices, indices, tris); if (ntris <= 0) //TODO notify user when this happens. Logging? { Console.WriteLine("ntris <= 0"); ntris = -ntris; } //add and merge vertices for (int i = 0; i < cont.Vertices.Length; i++) { var cv = cont.Vertices[i]; var pv = vertices[i]; //save the hash code for each vertex indices[i] = AddVertex(vertDict, pv, verts); if (RegionId.HasFlags(cv.RegionId, RegionFlags.VertexBorder)) { //the vertex should be removed vertRemoveQueue.Enqueue(indices[i]); } } contPolys.Clear(); //iterate through all the triangles for (int i = 0; i < ntris; i++) { Triangle ti = tris[i]; //make sure there are three distinct vertices. anything less can't be a polygon. if (ti.Index0 == ti.Index1 || ti.Index0 == ti.Index2 || ti.Index1 == ti.Index2) continue; //each polygon has numVertsPerPoly //index 0, 1, 2 store triangle vertices //other polygon indexes (3 to numVertsPerPoly - 1) should be used for storing extra vertices when two polygons merge together Polygon p = new Polygon(numVertsPerPoly, Area.Null, RegionId.Null); p.Vertices[0] = RemoveDiagonalFlag(indices[ti.Index0]); p.Vertices[1] = RemoveDiagonalFlag(indices[ti.Index1]); p.Vertices[2] = RemoveDiagonalFlag(indices[ti.Index2]); contPolys.Add(p); } //no polygons generated, so skip if (contPolys.Count == 0) continue; //merge polygons if (numVertsPerPoly > 3) { while (true) { //find best polygons int bestMergeVal = 0; int bestPolyA = 0, bestPolyB = 0, bestEdgeA = 0, bestEdgeB = 0; for (int i = 0; i < contPolys.Count - 1; i++) { int pj = i; for (int j = i + 1; j < contPolys.Count; j++) { int pk = j; int ea = 0, eb = 0; int v = GetPolyMergeValue(contPolys, pj, pk, verts, out ea, out eb); if (v > bestMergeVal) { bestMergeVal = v; bestPolyA = i; bestPolyB = j; bestEdgeA = ea; bestEdgeB = eb; } } } if (bestMergeVal <= 0) break; Polygon pa = contPolys[bestPolyA]; Polygon pb = contPolys[bestPolyB]; pa.MergeWith(pb, bestEdgeA, bestEdgeB, mergeTemp); contPolys[bestPolyB] = contPolys[contPolys.Count - 1]; contPolys.RemoveAt(contPolys.Count - 1); } } //store polygons for (int i = 0; i < contPolys.Count; i++) { Polygon p = contPolys[i]; Polygon p2 = new Polygon(numVertsPerPoly, cont.Area, cont.RegionId); Buffer.BlockCopy(p.Vertices, 0, p2.Vertices, 0, numVertsPerPoly * sizeof(int)); polys.Add(p2); } } //remove edge vertices while (vertRemoveQueue.Count > 0) { int i = vertRemoveQueue.Dequeue(); if (CanRemoveVertex(polys, i)) RemoveVertex(verts, polys, i); } //calculate adjacency (edges) BuildMeshAdjacency(verts, polys, numVertsPerPoly); //find portal edges if (this.borderSize > 0) { //iterate through all the polygons for (int i = 0; i < polys.Count; i++) { Polygon p = polys[i]; //iterate through all the vertices for (int j = 0; j < numVertsPerPoly; j++) { if (p.Vertices[j] == NullId) break; //skip connected edges if (p.NeighborEdges[j] != NullId) continue; int nj = j + 1; if (nj >= numVertsPerPoly || p.Vertices[nj] == NullId) nj = 0; //grab two consecutive vertices int va = p.Vertices[j]; int vb = p.Vertices[nj]; //set some flags if (verts[va].X == 0 && verts[vb].X == 0) p.NeighborEdges[j] = NeighborEdgeFlag | 0; else if (verts[va].Z == contSet.Height && verts[vb].Z == contSet.Height) p.NeighborEdges[j] = NeighborEdgeFlag | 1; else if (verts[va].X == contSet.Width && verts[vb].X == contSet.Width) p.NeighborEdges[j] = NeighborEdgeFlag | 2; else if (verts[va].Z == 0 && verts[vb].Z == 0) p.NeighborEdges[j] = NeighborEdgeFlag | 3; } } } this.vertices = verts.ToArray(); this.polygons = polys.ToArray(); } /// <summary> /// Gets the number of vertices /// </summary> public int VertCount { get { return vertices.Length; } } /// <summary> /// Gets the number of polygons /// </summary> public int PolyCount { get { return polygons.Length; } } /// <summary> /// Gets the number of vertices per polygon /// </summary> public int NumVertsPerPoly { get { return numVertsPerPoly; } } /// <summary> /// Gets the vertex data /// </summary> public PolyVertex[] Verts { get { return vertices; } } /// <summary> /// Gets the polygon data /// </summary> public Polygon[] Polys { get { return polygons; } } /// <summary> /// Gets the bounds. /// </summary> /// <value>The bounds.</value> public BBox3 Bounds { get { return bounds; } } /// <summary> /// Gets the cell size /// </summary> public float CellSize { get { return cellSize; } } /// <summary> /// Gets the cell height /// </summary> public float CellHeight { get { return cellHeight; } } /// <summary> /// Gets the border size /// </summary> public int BorderSize { get { return borderSize; } } /// <summary> /// Determines if it is a boundary edge with the specified flag. /// </summary> /// <returns><c>true</c> if is boundary edge the specified flag; otherwise, <c>false</c>.</returns> /// <param name="flag">The flag.</param> public static bool IsBoundaryEdge(int flag) { return (flag & NeighborEdgeFlag) != 0; } /// <summary> /// Determines if it is an interior edge with the specified flag. /// </summary> /// <returns><c>true</c> if is interior edge the specified flag; otherwise, <c>false</c>.</returns> /// <param name="flag">The flag.</param> public static bool IsInteriorEdge(int flag) { return (flag & NeighborEdgeFlag) == 0; } /// <summary> /// Determines if it is a diagonal flag on the specified index. /// </summary> /// <param name="index">The index</param> /// <returns><c>true</c> if it is a diagonal flag on the specified index; otherwise, <c>false</c>.</returns> public static bool HasDiagonalFlag(int index) { return (index & DiagonalFlag) != 0; } /// <summary> /// True if and only if (v[i], v[j]) is a proper internal diagonal of polygon. /// </summary> /// <param name="i">Vertex index i</param> /// <param name="j">Vertex index j</param> /// <param name="verts">Contour vertices</param> /// <param name="indices">PolyMesh indices</param> /// <returns>True, if internal diagonal. False, if otherwise.</returns> public static bool Diagonal(int i, int j, PolyVertex[] verts, int[] indices) { return InCone(i, j, verts, indices) && Diagonalie(i, j, verts, indices); } /// <summary> /// True if and only if diagonal (i, j) is strictly internal to polygon /// in neighborhood of i endpoint. /// </summary> /// <param name="i">Vertex index i</param> /// <param name="j">Vertex index j</param> /// <param name="verts">Contour vertices</param> /// <param name="indices">PolyMesh indices</param> /// <returns>True, if internal. False, if otherwise.</returns> public static bool InCone(int i, int j, PolyVertex[] verts, int[] indices) { int pi = RemoveDiagonalFlag(indices[i]); int pj = RemoveDiagonalFlag(indices[j]); int pi1 = RemoveDiagonalFlag(indices[Next(i, verts.Length)]); int pin1 = RemoveDiagonalFlag(indices[Prev(i, verts.Length)]); //if P[i] is convex vertex (i + 1 left or on (i - 1, i)) if (PolyVertex.IsLeftOn(ref verts[pin1], ref verts[pi], ref verts[pi1])) return PolyVertex.IsLeft(ref verts[pi], ref verts[pj], ref verts[pin1]) && PolyVertex.IsLeft(ref verts[pj], ref verts[pi], ref verts[pi1]); //assume (i - 1, i, i + 1) not collinear return !(PolyVertex.IsLeftOn(ref verts[pi], ref verts[pj], ref verts[pi1]) && PolyVertex.IsLeftOn(ref verts[pj], ref verts[pi], ref verts[pin1])); } /// <summary> /// True if and only if (v[i], v[j]) is internal or external diagonal /// ignoring edges incident to v[i] or v[j]. /// </summary> /// <param name="i">Vertex index i</param> /// <param name="j">Vertex index j</param> /// <param name="verts">Contour vertices</param> /// <param name="indices">PolyMesh indices</param> /// <returns>True, if internal or external diagonal. False, if otherwise.</returns> public static bool Diagonalie(int i, int j, PolyVertex[] verts, int[] indices) { int d0 = RemoveDiagonalFlag(indices[i]); int d1 = RemoveDiagonalFlag(indices[j]); //for each edge (k, k + 1) for (int k = 0; k < verts.Length; k++) { int k1 = Next(k, verts.Length); //skip edges incident to i or j if (!((k == i) || (k1 == i) || (k == j) || (k1 == j))) { int p0 = RemoveDiagonalFlag(indices[k]); int p1 = RemoveDiagonalFlag(indices[k1]); if (PolyVertex.Equal2D(ref verts[d0], ref verts[p0]) || PolyVertex.Equal2D(ref verts[d1], ref verts[p0]) || PolyVertex.Equal2D(ref verts[d0], ref verts[p1]) || PolyVertex.Equal2D(ref verts[d1], ref verts[p1])) continue; if (PolyVertex.Intersect(ref verts[d0], ref verts[d1], ref verts[p0], ref verts[p1])) return false; } } return true; } /// <summary> /// Gets the previous vertex index /// </summary> /// <param name="i">The current index</param> /// <param name="n">The max number of vertices</param> /// <returns>The previous index</returns> private static int Prev(int i, int n) { return i - 1 >= 0 ? i - 1 : n - 1; } /// <summary> /// Gets the next vertex index /// </summary> /// <param name="i">The current index</param> /// <param name="n">The max number of vertices</param> /// <returns>The next index</returns> private static int Next(int i, int n) { return i + 1 < n ? i + 1 : 0; } /// <summary> /// Determines whether the vertices follow a certain order /// </summary> /// <param name="a">Vertex A</param> /// <param name="b">Vertex B</param> /// <param name="c">Vertex C</param> /// <returns>True if conditions met, false if not</returns> private static bool ULeft(PolyVertex a, PolyVertex b, PolyVertex c) { return (b.X - a.X) * (c.Z - a.Z) - (c.X - a.X) * (b.Z - a.Z) < 0; } /// <summary> /// Sets the diagonal flag for a vertex /// </summary> /// <param name="index">The vertex index</param> private static void SetDiagonalFlag(ref int index) { index |= DiagonalFlag; } /// <summary> /// Remove the diagonal flag for a vertex /// </summary> /// <param name="index">The vertex index</param> /// <returns>The new index</returns> private static int RemoveDiagonalFlag(int index) { return index & ~DiagonalFlag; } /// <summary> /// Remove the diagonal flag for a vertex /// </summary> /// <param name="index">The vertex index</param> private static void RemoveDiagonalFlag(ref int index) { index &= ~DiagonalFlag; } /// <summary> /// Walk the edges of a contour to determine whether a triangle can be formed. /// Form as many triangles as possible. /// </summary> /// <param name="verts">Vertices array</param> /// <param name="indices">Indices array</param> /// <param name="tris">Triangles array</param> /// <returns>The number of triangles.</returns> private static int Triangulate(int n, PolyVertex[] verts, int[] indices, Triangle[] tris) { int ntris = 0; //last bit of index determines whether vertex can be removed for (int i = 0; i < n; i++) { int i1 = Next(i, n); int i2 = Next(i1, n); if (Diagonal(i, i2, verts, indices)) { SetDiagonalFlag(ref indices[i1]); } } //need 3 verts minimum for a polygon while (n > 3) { //find the minimum distance betwee two vertices. //also, save their index int minLen = -1; int minIndex = -1; for (int i = 0; i < n; i++) { int i1 = Next(i, n); if (HasDiagonalFlag(indices[i1])) { int p0 = RemoveDiagonalFlag(indices[i]); int p2 = RemoveDiagonalFlag(indices[Next(i1, n)]); int dx = verts[p2].X - verts[p0].X; int dy = verts[p2].Z - verts[p0].Z; int len = dx * dx + dy * dy; if (minLen < 0 || len < minLen) { minLen = len; minIndex = i; } } } if (minIndex == -1) { minLen = -1; minIndex = -1; for (int i = 0; i < n; i++) { int i1 = Next(i, n); int i2 = Next(i1, n); if (DiagonalLoose(i, i2, verts, indices)) { int p0 = RemoveDiagonalFlag(indices[i]); int p2 = RemoveDiagonalFlag(indices[Next(i2, n)]); int dx = verts[p2].X - verts[p0].X; int dy = verts[p2].Z - verts[p0].Z; int len = dx * dx + dy * dy; if (minLen < 0 || len < minLen) { minLen = len; minIndex = i; } } } //really messed up if (minIndex == -1) return -ntris; } int mi = minIndex; int mi1 = Next(mi, n); int mi2 = Next(mi1, n); tris[ntris] = new Triangle(); tris[ntris].Index0 = RemoveDiagonalFlag(indices[mi]); tris[ntris].Index1 = RemoveDiagonalFlag(indices[mi1]); tris[ntris].Index2 = RemoveDiagonalFlag(indices[mi2]); ntris++; //remove P[i1] n--; for (int k = mi1; k < n; k++) indices[k] = indices[k + 1]; if (mi1 >= n) mi1 = 0; mi = Prev(mi1, n); //update diagonal flags if (Diagonal(Prev(mi, n), mi1, verts, indices)) { SetDiagonalFlag(ref indices[mi]); } else { RemoveDiagonalFlag(ref indices[mi]); } if (Diagonal(mi, Next(mi1, n), verts, indices)) { SetDiagonalFlag(ref indices[mi1]); } else { RemoveDiagonalFlag(ref indices[mi1]); } } //append remaining triangle tris[ntris] = new Triangle(); tris[ntris].Index0 = RemoveDiagonalFlag(indices[0]); tris[ntris].Index1 = RemoveDiagonalFlag(indices[1]); tris[ntris].Index2 = RemoveDiagonalFlag(indices[2]); ntris++; return ntris; } /// <summary> /// Generate a new vertices with (x, y, z) coordiates and return the hash code index /// </summary> /// <param name="vertDict">Vertex dictionary that maps coordinates to index</param> /// <param name="v">A vertex.</param> /// <param name="verts">The list of vertices</param> /// <returns>The vertex index</returns> private static int AddVertex(Dictionary<PolyVertex, int> vertDict, PolyVertex v, List<PolyVertex> verts) { int index; if (vertDict.TryGetValue(v, out index)) { return index; } index = verts.Count; verts.Add(v); vertDict.Add(v, index); return index; } /// <summary> /// Try to merge two polygons. If possible, return the distance squared between two vertices. /// </summary> /// <param name="polys">Polygon list</param> /// <param name="polyA">Polygon A</param> /// <param name="polyB">Polygon B</param> /// <param name="verts">Vertex list</param> /// <param name="edgeA">Shared edge's endpoint A</param> /// <param name="edgeB">Shared edge's endpoint B</param> /// <returns>The distance between two vertices</returns> private static int GetPolyMergeValue(List<Polygon> polys, int polyA, int polyB, List<PolyVertex> verts, out int edgeA, out int edgeB) { int numVertsA = polys[polyA].VertexCount; int numVertsB = polys[polyB].VertexCount; //check if polygons share an edge edgeA = -1; edgeB = -1; //don't merge if result is too big if (numVertsA + numVertsB - 2 > polys[polyA].Vertices.Length) return -1; //iterate through all the vertices of polygonA for (int i = 0; i < numVertsA; i++) { //take two nearby vertices int va0 = polys[polyA].Vertices[i]; int va1 = polys[polyA].Vertices[(i + 1) % numVertsA]; //make sure va0 < va1 if (va0 > va1) { int temp = va0; va0 = va1; va1 = temp; } //iterate through all the vertices of polygon B for (int j = 0; j < numVertsB; j++) { //take two nearby vertices int vb0 = polys[polyB].Vertices[j]; int vb1 = polys[polyB].Vertices[(j + 1) % numVertsB]; //make sure vb0 < vb1 if (vb0 > vb1) { int temp = vb0; vb0 = vb1; vb1 = temp; } //edge shared, since vertices are equal if (va0 == vb0 && va1 == vb1) { edgeA = i; edgeB = j; break; } } } //no common edge if (edgeA == -1 || edgeB == -1) return -1; //check if merged polygon would be convex int vertA, vertB, vertC; vertA = polys[polyA].Vertices[(edgeA + numVertsA - 1) % numVertsA]; vertB = polys[polyA].Vertices[edgeA]; vertC = polys[polyB].Vertices[(edgeB + 2) % numVertsB]; if (!ULeft(verts[vertA], verts[vertB], verts[vertC])) return -1; vertA = polys[polyB].Vertices[(edgeB + numVertsB - 1) % numVertsB]; vertB = polys[polyB].Vertices[edgeB]; vertC = polys[polyA].Vertices[(edgeA + 2) % numVertsA]; if (!ULeft(verts[vertA], verts[vertB], verts[vertC])) return -1; vertA = polys[polyA].Vertices[edgeA]; vertB = polys[polyA].Vertices[(edgeA + 1) % numVertsA]; int dx = (int)(verts[vertA].X - verts[vertB].X); int dy = (int)(verts[vertA].Z - verts[vertB].Z); return dx * dx + dy * dy; } /// <summary> /// If vertex can't be removed, there is no need to spend time deleting it. /// </summary> /// <param name="polys">The polygon list</param> /// <param name="remove">The vertex index</param> /// <returns>True, if vertex can be removed. False, if otherwise.</returns> private static bool CanRemoveVertex(List<Polygon> polys, int remove) { //count number of polygons to remove int numRemovedVerts = 0; int numTouchedVerts = 0; int numRemainingEdges = 0; for (int i = 0; i < polys.Count; i++) { Polygon p = polys[i]; int nv = p.VertexCount; int numRemoved = 0; int numVerts = 0; for (int j = 0; j < nv; j++) { if (p.Vertices[j] == remove) { numTouchedVerts++; numRemoved++; } numVerts++; } if (numRemoved > 0) { numRemovedVerts += numRemoved; numRemainingEdges += numVerts - (numRemoved + 1); } } //don't remove a vertex from a triangle since you need at least three vertices to make a polygon if (numRemainingEdges <= 2) return false; //find edges which share removed vertex int maxEdges = numTouchedVerts * 2; int nedges = 0; int[] edges = new int[maxEdges * 3]; for (int i = 0; i < polys.Count; i++) { Polygon p = polys[i]; int nv = p.VertexCount; //collect edges which touch removed vertex for (int j = 0, k = nv - 1; j < nv; k = j++) { if (p.Vertices[j] == remove || p.Vertices[k] == remove) { //arrange edge so that a has the removed value int a = p.Vertices[j], b = p.Vertices[k]; if (b == remove) { int temp = a; a = b; b = temp; } //check if edge exists bool exists = false; for (int m = 0; m < nedges; m++) { int e = m * 3; if (edges[e + 1] == b) { //increment vertex share count edges[e + 2]++; exists = true; } } //add new edge if (!exists) { int e = nedges * 3; edges[e + 0] = a; edges[e + 1] = b; edges[e + 2] = 1; nedges++; } } } } //make sure there can't be more than two open edges //since there could be two non-adjacent polygons which share the same vertex, which shouldn't be removed int numOpenEdges = 0; for (int i = 0; i < nedges; i++) { if (edges[i * 3 + 2] < 2) numOpenEdges++; } if (numOpenEdges > 2) return false; return true; } /// <summary> /// Connect two adjacent vertices with edges. /// </summary> /// <param name="vertices">The vertex list</param> /// <param name="polys">The polygon list</param> /// <param name="numVertsPerPoly">Number of vertices per polygon</param> private static void BuildMeshAdjacency(List<PolyVertex> vertices, List<Polygon> polys, int numVertsPerPoly) { int maxEdgeCount = polys.Count * numVertsPerPoly; int[] firstEdge = new int[vertices.Count + maxEdgeCount]; int nextEdge = vertices.Count; List<AdjacencyEdge> edges = new List<AdjacencyEdge>(maxEdgeCount); for (int i = 0; i < vertices.Count; i++) firstEdge[i] = NullId; //Iterate through all the polygons for (int i = 0; i < polys.Count; i++) { Polygon p = polys[i]; //Iterate through all the vertices for (int j = 0; j < numVertsPerPoly; j++) { if (p.Vertices[j] == NullId) break; //get closest two verts int v0 = p.Vertices[j]; int v1 = (j + 1 >= numVertsPerPoly || p.Vertices[j + 1] == NullId) ? p.Vertices[0] : p.Vertices[j + 1]; if (v0 < v1) { AdjacencyEdge edge; //store vertices edge.Vert0 = v0; edge.Vert1 = v1; //poly array stores index of polygon //polyEdge stores the vertex edge.Poly0 = i; edge.PolyEdge0 = j; edge.Poly1 = i; edge.PolyEdge1 = 0; //insert edge firstEdge[nextEdge + edges.Count] = firstEdge[v0]; firstEdge[v0] = edges.Count; edges.Add(edge); } } } //Iterate through all the polygons again for (int i = 0; i < polys.Count; i++) { Polygon p = polys[i]; for (int j = 0; j < numVertsPerPoly; j++) { if (p.Vertices[j] == NullId) break; //get adjacent vertices int v0 = p.Vertices[j]; int v1 = (j + 1 >= numVertsPerPoly || p.Vertices[j + 1] == NullId) ? p.Vertices[0] : p.Vertices[j + 1]; if (v0 > v1) { //Iterate through all the edges for (int e = firstEdge[v1]; e != NullId; e = firstEdge[nextEdge + e]) { AdjacencyEdge edge = edges[e]; if (edge.Vert1 == v0 && edge.Poly0 == edge.Poly1) { edge.Poly1 = i; edge.PolyEdge1 = j; edges[e] = edge; break; } } } } } //store adjacency for (int i = 0; i < edges.Count; i++) { AdjacencyEdge e = edges[i]; //the endpoints belong to different polygons if (e.Poly0 != e.Poly1) { //store other polygon number as part of extra info polys[e.Poly0].NeighborEdges[e.PolyEdge0] = e.Poly1; polys[e.Poly1].NeighborEdges[e.PolyEdge1] = e.Poly0; } } } /// <summary> /// Removing vertices will leave holes that have to be triangulated again. /// </summary> /// <param name="verts">A list of vertices</param> /// <param name="polys">A list of polygons</param> /// <param name="vertex">The vertex to remove</param> private void RemoveVertex(List<PolyVertex> verts, List<Polygon> polys, int vertex) { int[] mergeTemp = new int[numVertsPerPoly]; //count number of polygons to remove int numRemovedVerts = 0; for (int i = 0; i < polys.Count; i++) { Polygon p = polys[i]; for (int j = 0; j < p.VertexCount; j++) { if (p.Vertices[j] == vertex) numRemovedVerts++; } } List<Edge> edges = new List<Edge>(numRemovedVerts * numVertsPerPoly); List<int> hole = new List<int>(numRemovedVerts * numVertsPerPoly); List<RegionId> regions = new List<RegionId>(numRemovedVerts * numVertsPerPoly); List<Area> areas = new List<Area>(numRemovedVerts * numVertsPerPoly); //Iterate through all the polygons for (int i = 0; i < polys.Count; i++) { Polygon p = polys[i]; if (p.ContainsVertex(vertex)) { int nv = p.VertexCount; //collect edges which don't touch removed vertex for (int j = 0, k = nv - 1; j < nv; k = j++) if (p.Vertices[j] != vertex && p.Vertices[k] != vertex) edges.Add(new Edge(p.Vertices[k], p.Vertices[j], p.RegionId, p.Area)); polys[i] = polys[polys.Count - 1]; polys.RemoveAt(polys.Count - 1); i--; } } //remove vertex verts.RemoveAt(vertex); //adjust indices for (int i = 0; i < polys.Count; i++) { Polygon p = polys[i]; for (int j = 0; j < p.VertexCount; j++) { if (p.Vertices[j] > vertex) p.Vertices[j]--; } } for (int i = 0; i < edges.Count; i++) { Edge edge = edges[i]; if (edge.Vert0 > vertex) edge.Vert0--; if (edge.Vert1 > vertex) edge.Vert1--; edges[i] = edge; } if (edges.Count == 0) return; //Find edges surrounding the holes hole.Add(edges[0].Vert0); regions.Add(edges[0].Region); areas.Add(edges[0].Area); while (edges.Count > 0) { bool match = false; for (int i = 0; i < edges.Count; i++) { Edge edge = edges[i]; bool add = false; if (hole[0] == edge.Vert1) { //segment matches beginning of hole boundary hole.Insert(0, edge.Vert0); regions.Insert(0, edge.Region); areas.Insert(0, edge.Area); add = true; } else if (hole[hole.Count - 1] == edge.Vert0) { //segment matches end of hole boundary hole.Add(edge.Vert1); regions.Add(edge.Region); areas.Add(edge.Area); add = true; } if (add) { //edge segment was added so remove it edges[i] = edges[edges.Count - 1]; edges.RemoveAt(edges.Count - 1); match = true; i--; } } if (!match) break; } var tris = new Triangle[hole.Count]; var tverts = new PolyVertex[hole.Count]; var thole = new int[hole.Count]; //generate temp vertex array for triangulation for (int i = 0; i < hole.Count; i++) { int polyIndex = hole[i]; tverts[i] = verts[polyIndex]; thole[i] = i; } //triangulate the hole int ntris = Triangulate(hole.Count, tverts, thole, tris); if (ntris < 0) ntris = -ntris; //merge hole triangles back to polygons List<Polygon> mergePolys = new List<Polygon>(ntris + 1); for (int j = 0; j < ntris; j++) { Triangle t = tris[j]; if (t.Index0 != t.Index1 && t.Index0 != t.Index2 && t.Index1 != t.Index2) { Polygon p = new Polygon(numVertsPerPoly, areas[t.Index0], regions[t.Index0]); p.Vertices[0] = hole[t.Index0]; p.Vertices[1] = hole[t.Index1]; p.Vertices[2] = hole[t.Index2]; mergePolys.Add(p); } } if (mergePolys.Count == 0) return; //merge polygons if (numVertsPerPoly > 3) { while (true) { //find best polygons int bestMergeVal = 0; int bestPolyA = 0, bestPolyB = 0, bestEa = 0, bestEb = 0; for (int j = 0; j < mergePolys.Count - 1; j++) { int pj = j; for (int k = j + 1; k < mergePolys.Count; k++) { int pk = k; int edgeA, edgeB; int v = GetPolyMergeValue(mergePolys, pj, pk, verts, out edgeA, out edgeB); if (v > bestMergeVal) { bestMergeVal = v; bestPolyA = j; bestPolyB = k; bestEa = edgeA; bestEb = edgeB; } } } if (bestMergeVal <= 0) break; Polygon pa = mergePolys[bestPolyA]; Polygon pb = mergePolys[bestPolyB]; pa.MergeWith(pb, bestEa, bestEb, mergeTemp); mergePolys[bestPolyB] = mergePolys[mergePolys.Count - 1]; mergePolys.RemoveAt(mergePolys.Count - 1); } } //add merged polys back to the list. polys.AddRange(mergePolys); } private static bool DiagonalLoose(int i, int j, PolyVertex[] verts, int[] indices) { return InConeLoose(i, j, verts, indices) && DiagonalieLoose(i, j, verts, indices); } private static bool InConeLoose(int i, int j, PolyVertex[] verts, int[] indices) { int pi = RemoveDiagonalFlag(indices[i]); int pj = RemoveDiagonalFlag(indices[j]); int pi1 = RemoveDiagonalFlag(indices[Next(i, verts.Length)]); int pin1 = RemoveDiagonalFlag(indices[Prev(i, verts.Length)]); if (PolyVertex.IsLeftOn(ref verts[pin1], ref verts[pi], ref verts[pi1])) return PolyVertex.IsLeftOn(ref verts[pi], ref verts[pj], ref verts[pin1]) && PolyVertex.IsLeftOn(ref verts[pj], ref verts[pi], ref verts[pi1]); return !(PolyVertex.IsLeftOn(ref verts[pi], ref verts[pj], ref verts[pi1]) && PolyVertex.IsLeftOn(ref verts[pj], ref verts[pi], ref verts[pin1])); } private static bool DiagonalieLoose(int i, int j, PolyVertex[] verts, int[] indices) { int d0 = RemoveDiagonalFlag(indices[i]); int d1 = RemoveDiagonalFlag(indices[j]); for (int k = 0; k < verts.Length; k++) { int k1 = Next(k, verts.Length); if (!((k == i) || (k1 == i) || (k == j) || (k1 == j))) { int p0 = RemoveDiagonalFlag(indices[k]); int p1 = RemoveDiagonalFlag(indices[k1]); if (PolyVertex.Equal2D(ref verts[d0], ref verts[p0]) || PolyVertex.Equal2D(ref verts[d1], ref verts[p0]) || PolyVertex.Equal2D(ref verts[d0], ref verts[p1]) || PolyVertex.Equal2D(ref verts[d1], ref verts[p1])) continue; if (PolyVertex.IntersectProp(ref verts[d0], ref verts[d1], ref verts[p0], ref verts[p1])) return false; } } return true; } /// <summary> /// A triangle contains three indices. /// </summary> private struct Triangle { public int Index0; public int Index1; public int Index2; } /// <summary> /// Two adjacent vertices form an edge. /// </summary> private struct AdjacencyEdge { public int Vert0; public int Vert1; public int PolyEdge0; public int PolyEdge1; public int Poly0; public int Poly1; } /// <summary> /// Another edge structure, but this one contains the RegionId and AreaId. /// </summary> private struct Edge { public int Vert0; public int Vert1; public RegionId Region; public Area Area; /// <summary> /// Initializes a new instance of the <see cref="Edge"/> struct. /// </summary> /// <param name="vert0">Vertex A</param> /// <param name="vert1">Vertex B</param> /// <param name="region">Region id</param> /// <param name="area">Area id</param> public Edge(int vert0, int vert1, RegionId region, Area area) { Vert0 = vert0; Vert1 = vert1; Region = region; Area = area; } } /// <summary> /// Each polygon is a collection of vertices. It is the basic unit of the PolyMesh /// </summary> public class Polygon { private int[] vertices; //"numVertsPerPoly" elements private int[] neighborEdges; //"numVertsPerPoly" elements private Area area; private RegionId regionId; /// <summary> /// Initializes a new instance of the <see cref="Polygon" /> class. /// </summary> /// <param name="numVertsPerPoly">The number of vertices per polygon.</param> /// <param name="area">The AreaId</param> /// <param name="regionId">The RegionId</param> public Polygon(int numVertsPerPoly, Area area, RegionId regionId) { vertices = new int[numVertsPerPoly]; neighborEdges = new int[numVertsPerPoly]; this.area = area; this.regionId = regionId; for (int i = 0; i < numVertsPerPoly; i++) { vertices[i] = NullId; neighborEdges[i] = NullId; } } /// <summary> /// Gets the indices for the vertices. /// </summary> /// <value>The vertices.</value> public int[] Vertices { get { return vertices; } } /// <summary> /// Gets the neighbor edges. /// </summary> /// <value>The neighbor edges.</value> public int[] NeighborEdges { get { return neighborEdges; } } /// <summary> /// Gets or sets the area id /// </summary> public Area Area { get { return area; } set { area = value; } } /// <summary> /// Gets or sets the region identifier. /// </summary> /// <value>The region identifier.</value> public RegionId RegionId { get { return regionId; } set { regionId = value; } } /// <summary> /// Gets or sets a tag for this instance. /// </summary> /// <value>Any object to tag this instance with.</value> public object Tag { get; set; } /// <summary> /// Gets the the number of vertex. /// </summary> /// <value>The vertex count.</value> public int VertexCount { get { for (int i = 0; i < vertices.Length; i++) if (vertices[i] == NullId) return i; return vertices.Length; } } /// <summary> /// Determine if the vertex is in polygon. /// </summary> /// <returns><c>true</c>, if vertex was containsed, <c>false</c> otherwise.</returns> /// <param name="vertex">The Vertex.</param> public bool ContainsVertex(int vertex) { //iterate through all the vertices for (int i = 0; i < vertices.Length; i++) { //find the vertex, return false if at end of defined polygon. int v = vertices[i]; if (v == vertex) return true; else if (v == NullId) return false; } return false; } /// <summary> /// Merges another polygon with this one. /// </summary> /// <param name="other">The other polygon to merge into this one.</param> /// <param name="startEdge">This starting edge for this polygon.</param> /// <param name="otherStartEdge">The starting edge for the other polygon.</param> /// <param name="temp">A temporary vertex buffer. Must be at least <c>numVertsPerPoly</c> long.</param> public void MergeWith(Polygon other, int startEdge, int otherStartEdge, int[] temp) { if (temp.Length < vertices.Length) throw new ArgumentException("Buffer not large enough. Must be at least numVertsPerPoly (" + vertices.Length + ")", "temp"); int thisCount = this.VertexCount; int otherCount = other.VertexCount; int n = 0; for (int t = 0; t < temp.Length; t++) temp[t] = NullId; //add self, starting at best edge for (int i = 0; i < thisCount - 1; i++) temp[n++] = this.Vertices[(startEdge + 1 + i) % thisCount]; //add other polygon for (int i = 0; i < otherCount - 1; i++) temp[n++] = other.Vertices[(otherStartEdge + 1 + i) % otherCount]; //save merged data back Array.Copy(temp, this.vertices, this.vertices.Length); } } } }
26.324324
149
0.598326
[ "MIT" ]
AngelKyriako/SharpNav
Source/SharpNav/PolyMesh.cs
37,986
C#
// ----------------------------------------------------------------------- // <copyright file="ICostEstimationManager.cs" company="Microsoft Corporation"> // Copyright (c) Microsoft Corporation. All rights reserved. // </copyright> // ----------------------------------------------------------------------- using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.Azure.CCME.Assessment.Models; namespace Microsoft.Azure.CCME.Assessment.Managers { public interface ICostEstimationManager { Task<CostEstimationResult> ProcessAsync( IEnumerable<SubscriptionModel> subscriptions, string targetRegion); } }
32.047619
79
0.579495
[ "MIT" ]
Azure/ccme
src/shared/Common/Managers/ICostEstimationManager.cs
675
C#
/* Copyright 2010-present MongoDB Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ using MongoDB.Bson; using MongoDB.Driver.Core.Misc; using MongoDB.Driver.Linq.Linq3Implementation.Ast.Visitors; using MongoDB.Driver.Linq.Linq3Implementation.Misc; using System.Collections.Generic; using System.Linq; namespace MongoDB.Driver.Linq.Linq3Implementation.Ast.Expressions { internal sealed class AstAndExpression : AstExpression { private readonly IReadOnlyList<AstExpression> _args; public AstAndExpression(IEnumerable<AstExpression> args) { _args = Ensure.IsNotNull(args, nameof(args)).AsReadOnlyList(); Ensure.That(_args.Count > 0, "args cannot be empty.", nameof(args)); Ensure.That(!_args.Contains(null), "args cannot contain null.", nameof(args)); } public IReadOnlyList<AstExpression> Args => _args; public override AstNodeType NodeType => AstNodeType.AndExpression; public override AstNode Accept(AstNodeVisitor visitor) { return visitor.VisitAndExpression(this); } public override BsonValue Render() { return new BsonDocument("$and", new BsonArray(_args.Select(a => a.Render()))); } public AstAndExpression Update(IEnumerable<AstExpression> args) { if (args == _args) { return this; } return new AstAndExpression(args); } } }
33.25
90
0.680201
[ "Apache-2.0" ]
BorisDog/mongo-csharp-driver
src/MongoDB.Driver/Linq/Linq3Implementation/Ast/Expressions/AstAndExpression.cs
1,997
C#
using System; namespace NAdapter { /// <summary> /// An error was made during the specification of a type /// </summary> public class InvalidTypeSpecificationException : Exception { /// <summary> /// Constructor. /// </summary> /// <param name="errors">The errors found in the specification</param> internal InvalidTypeSpecificationException(string[] errors) : base(string.Format("Errors while validating type: {0}", String.Join("\r\n", errors))) { } } }
28.473684
97
0.606285
[ "MIT" ]
keith-anders/NAdapter
src/NAdapter/Exceptions/InvalidTypeSpecificationException.cs
543
C#
using System.IO; namespace Unity.VisualScripting { [Plugin(BoltFlow.ID)] public class BoltFlowPaths : PluginPaths { public BoltFlowPaths(Plugin plugin) : base(plugin) { } public string unitOptions => Path.Combine(transientGenerated, "UnitOptions.db"); } }
22.307692
88
0.686207
[ "MIT" ]
2PUEG-VRIK/UnityEscapeGame
2P-UnityEscapeGame/Library/PackageCache/com.unity.visualscripting@1.6.1/Editor/VisualScripting.Flow/Plugin/BoltFlowPaths.cs
290
C#
using SimpleJSON; using System.Linq; using UnityEngine; namespace ToySerialController.Utils { public static class Extensions { public static Rigidbody GetRigidBodyByName(this Atom atom, string name) => ComponentCache.GetRigidbody(atom, name); public static T GetComponentByName<T>(this Component component, string name) where T : Component => ComponentCache.GetComponent<T>(component, name); public static void Store(this JSONNode config, JSONStorableParam storable) { if (storable == null) return; const string dummyNodeName = "Dummy"; var dummyNode = new JSONClass(); var oldName = storable.name; storable.name = dummyNodeName; storable.StoreJSON(dummyNode, forceStore: true); storable.name = oldName; var nodeNames = storable.name.Split(':'); var node = config; foreach(var name in nodeNames.Take(nodeNames.Length - 1)) node = node[name]; node[nodeNames.Last()] = dummyNode[dummyNodeName]; } public static void Restore(this JSONNode config, JSONStorableParam storable) { if (storable == null) return; const string dummyNodeName = "Dummy"; var dummyNode = new JSONClass(); var oldName = storable.name; var nodeNames = storable.name.Split(':'); var node = config; foreach (var name in nodeNames.Take(nodeNames.Length - 1)) node = node[name]; dummyNode[dummyNodeName] = node[nodeNames.Last()]; storable.name = dummyNodeName; storable.RestoreFromJSON(dummyNode); storable.name = oldName; } } }
31.77193
156
0.594147
[ "MIT" ]
Yoooi0/ToySerialController
src/Utils/Extensions.cs
1,813
C#
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** using System; using System.Collections.Generic; using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; namespace Pulumi.Aws.WafV2.Inputs { public sealed class WebAclRuleStatementNotStatementStatementNotStatementStatementOrStatementStatementSizeConstraintStatementFieldToMatchSingleHeaderArgs : Pulumi.ResourceArgs { /// <summary> /// The name of the query header to inspect. This setting must be provided as lower case characters. /// </summary> [Input("name", required: true)] public Input<string> Name { get; set; } = null!; public WebAclRuleStatementNotStatementStatementNotStatementStatementOrStatementStatementSizeConstraintStatementFieldToMatchSingleHeaderArgs() { } } }
37.192308
178
0.7394
[ "ECL-2.0", "Apache-2.0" ]
Otanikotani/pulumi-aws
sdk/dotnet/WafV2/Inputs/WebAclRuleStatementNotStatementStatementNotStatementStatementOrStatementStatementSizeConstraintStatementFieldToMatchSingleHeaderArgs.cs
967
C#
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Collections; using System.Runtime.InteropServices; namespace System.Management { //CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC// /// <summary> /// <para> Represents different collections of management objects /// retrieved through WMI. The objects in this collection are of <see cref='System.Management.ManagementBaseObject'/>-derived types, including <see cref='System.Management.ManagementObject'/> and <see cref='System.Management.ManagementClass'/> /// .</para> /// <para> The collection can be the result of a WMI /// query executed through a <see cref='System.Management.ManagementObjectSearcher'/> object, or an enumeration of /// management objects of a specified type retrieved through a <see cref='System.Management.ManagementClass'/> representing that type. /// In addition, this can be a collection of management objects related in a specified /// way to a specific management object - in this case the collection would /// be retrieved through a method such as <see cref='System.Management.ManagementObject.GetRelated()'/>.</para> /// <para>The collection can be walked using the <see cref='System.Management.ManagementObjectCollection.ManagementObjectEnumerator'/> and objects in it can be inspected or /// manipulated for various management tasks.</para> /// </summary> /// <example> /// <code lang='C#'>using System; /// using System.Management; /// /// // This example demonstrates how to enumerate instances of a ManagementClass object. /// class Sample_ManagementObjectCollection /// { /// public static int Main(string[] args) { /// ManagementClass diskClass = new ManagementClass("Win32_LogicalDisk"); /// ManagementObjectCollection disks = diskClass.GetInstances(); /// foreach (ManagementObject disk in disks) { /// Console.WriteLine("Disk = " + disk["deviceid"]); /// } /// return 0; /// } /// } /// </code> /// <code lang='VB'>Imports System /// Imports System.Management /// /// ' This example demonstrates how to enumerate instances of a ManagementClass object. /// Class Sample_ManagementObjectCollection /// Overloads Public Shared Function Main(args() As String) As Integer /// Dim diskClass As New ManagementClass("Win32_LogicalDisk") /// Dim disks As ManagementObjectCollection = diskClass.GetInstances() /// Dim disk As ManagementObject /// For Each disk In disks /// Console.WriteLine("Disk = " &amp; disk("deviceid").ToString()) /// Next disk /// Return 0 /// End Function /// End Class /// </code> /// </example> //CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC// public class ManagementObjectCollection : ICollection, IEnumerable, IDisposable { private static readonly string name = typeof(ManagementObjectCollection).FullName; //fields internal ManagementScope scope; internal EnumerationOptions options; private readonly IEnumWbemClassObject enumWbem; //holds WMI enumerator for this collection private bool isDisposed = false; //Constructor internal ManagementObjectCollection( ManagementScope scope, EnumerationOptions options, IEnumWbemClassObject enumWbem) { if (null != options) this.options = (EnumerationOptions) options.Clone(); else this.options = new EnumerationOptions (); if (null != scope) this.scope = (ManagementScope)scope.Clone (); else this.scope = ManagementScope._Clone(null); this.enumWbem = enumWbem; } /// <summary> /// <para>Disposes of resources the object is holding. This is the destructor for the object.</para> /// </summary> ~ManagementObjectCollection () { Dispose ( false ); } /// <summary> /// Releases resources associated with this object. After this /// method has been called, an attempt to use this object will /// result in an ObjectDisposedException being thrown. /// </summary> public void Dispose () { if (!isDisposed) { Dispose ( true ) ; } } private void Dispose ( bool disposing ) { if ( disposing ) { GC.SuppressFinalize (this); isDisposed = true; } Marshal.ReleaseComObject (enumWbem); } // //ICollection properties & methods // /// <summary> /// <para>Represents the number of objects in the collection.</para> /// </summary> /// <value> /// <para>The number of objects in the collection.</para> /// </value> /// <remarks> /// <para>This property is very expensive - it requires that /// all members of the collection be enumerated.</para> /// </remarks> public int Count { get { if (isDisposed) throw new ObjectDisposedException(name); // // We can not use foreach since it _always_ calls Dispose on the collection // invalidating the IEnumWbemClassObject pointers. // We prevent this by doing a manual walk of the collection. // int count = 0; IEnumerator enumCol = this.GetEnumerator ( ) ; while ( enumCol.MoveNext() == true ) { count++ ; } return count ; } } /// <summary> /// <para>Represents whether the object is synchronized.</para> /// </summary> /// <value> /// <para><see langword='true'/>, if the object is synchronized; /// otherwise, <see langword='false'/>.</para> /// </value> public bool IsSynchronized { get { if (isDisposed) throw new ObjectDisposedException(name); return false; } } /// <summary> /// <para>Represents the object to be used for synchronization.</para> /// </summary> /// <value> /// <para> The object to be used for synchronization.</para> /// </value> public object SyncRoot { get { if (isDisposed) throw new ObjectDisposedException(name); return this; } } /// <overload> /// Copies the collection to an array. /// </overload> /// <summary> /// <para> Copies the collection to an array.</para> /// </summary> /// <param name='array'>An array to copy to. </param> /// <param name='index'>The index to start from. </param> public void CopyTo (Array array, int index) { if (isDisposed) throw new ObjectDisposedException(name); if (null == array) throw new ArgumentNullException (nameof(array)); if ((index < array.GetLowerBound (0)) || (index > array.GetUpperBound(0))) throw new ArgumentOutOfRangeException (nameof(index)); // Since we don't know the size until we've enumerated // we'll have to dump the objects in a list first then // try to copy them in. int capacity = array.Length - index; int numObjects = 0; ArrayList arrList = new ArrayList (); ManagementObjectEnumerator en = this.GetEnumerator(); ManagementBaseObject obj; while (en.MoveNext()) { obj = en.Current; arrList.Add(obj); numObjects++; if (numObjects > capacity) throw new ArgumentException (null, nameof(index)); } // If we get here we are OK. Now copy the list to the array arrList.CopyTo (array, index); return; } /// <summary> /// <para>Copies the items in the collection to a <see cref='System.Management.ManagementBaseObject'/> /// array.</para> /// </summary> /// <param name='objectCollection'>The target array.</param> /// <param name=' index'>The index to start from.</param> public void CopyTo (ManagementBaseObject[] objectCollection, int index) { CopyTo ((Array)objectCollection, index); } // //IEnumerable methods // //**************************************** //GetEnumerator //**************************************** /// <summary> /// <para>Returns the enumerator for the collection. If the collection was retrieved from an operation that /// specified the EnumerationOptions.Rewindable = false only one iteration through this enumerator is allowed. /// Note that this applies to using the Count property of the collection as well since an iteration over the collection /// is required. Due to this, code using the Count property should never specify EnumerationOptions.Rewindable = false. /// </para> /// </summary> /// <returns> /// An <see cref='System.Collections.IEnumerator'/>that can be used to iterate through the /// collection. /// </returns> public ManagementObjectEnumerator GetEnumerator() { if (isDisposed) throw new ObjectDisposedException(name); // // We do not clone the enumerator if its the first enumerator. // If it is the first enumerator we pass the reference // to the enumerator implementation rather than a clone. If the enumerator is used // from within a foreach statement in the client code, the foreach statement will // dec the ref count on the reference which also happens to be the reference to the // original enumerator causing subsequent uses of the collection to fail. // To prevent this we always clone the enumerator (assuming its a rewindable enumerator) // to avoid invalidating the collection. // // If its a forward only enumerator we simply pass back the original enumerator (i.e. // not cloned) and if it gets disposed we end up throwing the next time its used. Essentially, // the enumerator becomes the collection. // // Unless this is the first enumerator, we have // to clone. This may throw if we are non-rewindable. if ( this.options.Rewindable == true ) { IEnumWbemClassObject enumWbemClone = null; int status = (int)ManagementStatus.NoError; try { status = scope.GetSecuredIEnumWbemClassObjectHandler(enumWbem ).Clone_( ref enumWbemClone); if ((status & 0x80000000) == 0) { //since the original enumerator might not be reset, we need //to reset the new one. status = scope.GetSecuredIEnumWbemClassObjectHandler(enumWbemClone ).Reset_( ); } } catch (COMException e) { ManagementException.ThrowWithExtendedInfo (e); } if ((status & 0xfffff000) == 0x80041000) { ManagementException.ThrowWithExtendedInfo((ManagementStatus)status); } else if ((status & 0x80000000) != 0) { Marshal.ThrowExceptionForHR(status, WmiNetUtilsHelper.GetErrorInfo_f()); } return new ManagementObjectEnumerator (this, enumWbemClone); } else { // // Notice that we use the original enumerator and hence enum position is retained. // For example, if the client code manually walked half the collection and then // used a foreach statement, the foreach statement would continue from where the // manual walk ended. // return new ManagementObjectEnumerator(this, enumWbem); } } /// <internalonly/> /// <summary> /// <para>Returns an enumerator that can iterate through a collection.</para> /// </summary> /// <returns> /// An <see cref='System.Collections.IEnumerator'/> that can be used to iterate /// through the collection. /// </returns> IEnumerator IEnumerable.GetEnumerator() { return GetEnumerator (); } // // ManagementObjectCollection methods // //CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC /// <summary> /// <para>Represents the enumerator on the collection.</para> /// </summary> /// <example> /// <code lang='C#'>using System; /// using System.Management; /// /// // This example demonstrates how to enumerate all logical disks /// // using the ManagementObjectEnumerator object. /// class Sample_ManagementObjectEnumerator /// { /// public static int Main(string[] args) { /// ManagementClass diskClass = new ManagementClass("Win32_LogicalDisk"); /// ManagementObjectCollection disks = diskClass.GetInstances(); /// ManagementObjectCollection.ManagementObjectEnumerator disksEnumerator = /// disks.GetEnumerator(); /// while(disksEnumerator.MoveNext()) { /// ManagementObject disk = (ManagementObject)disksEnumerator.Current; /// Console.WriteLine("Disk found: " + disk["deviceid"]); /// } /// return 0; /// } /// } /// </code> /// <code lang='VB'>Imports System /// Imports System.Management /// ' This sample demonstrates how to enumerate all logical disks /// ' using ManagementObjectEnumerator object. /// Class Sample_ManagementObjectEnumerator /// Overloads Public Shared Function Main(args() As String) As Integer /// Dim diskClass As New ManagementClass("Win32_LogicalDisk") /// Dim disks As ManagementObjectCollection = diskClass.GetInstances() /// Dim disksEnumerator As _ /// ManagementObjectCollection.ManagementObjectEnumerator = _ /// disks.GetEnumerator() /// While disksEnumerator.MoveNext() /// Dim disk As ManagementObject = _ /// CType(disksEnumerator.Current, ManagementObject) /// Console.WriteLine("Disk found: " &amp; disk("deviceid")) /// End While /// Return 0 /// End Function /// End Class /// </code> /// </example> //CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC public class ManagementObjectEnumerator : IEnumerator, IDisposable { private static readonly string name = typeof(ManagementObjectEnumerator).FullName; private IEnumWbemClassObject enumWbem; private ManagementObjectCollection collectionObject; private uint cachedCount; //says how many objects are in the enumeration cache (when using BlockSize option) private int cacheIndex; //used to walk the enumeration cache private IWbemClassObjectFreeThreaded[] cachedObjects; //points to objects currently available in enumeration cache private bool atEndOfCollection; private bool isDisposed = false; //constructor internal ManagementObjectEnumerator( ManagementObjectCollection collectionObject, IEnumWbemClassObject enumWbem) { this.enumWbem = enumWbem; this.collectionObject = collectionObject; cachedObjects = new IWbemClassObjectFreeThreaded[collectionObject.options.BlockSize]; cachedCount = 0; cacheIndex = -1; // Reset position atEndOfCollection = false; } /// <summary> /// <para>Disposes of resources the object is holding. This is the destructor for the object.</para> /// </summary> ~ManagementObjectEnumerator () { Dispose (); } /// <summary> /// Releases resources associated with this object. After this /// method has been called, an attempt to use this object will /// result in an ObjectDisposedException being thrown. /// </summary> public void Dispose () { if (!isDisposed) { if (null != enumWbem) { Marshal.ReleaseComObject (enumWbem); enumWbem = null; } cachedObjects = null; // DO NOT dispose of collectionObject. It is merely a reference - its lifetime // exceeds that of this object. If collectionObject.Dispose was to be done here, // a reference count would be needed. // collectionObject = null; isDisposed = true; GC.SuppressFinalize (this); } } /// <summary> /// <para>Gets the current <see cref='System.Management.ManagementBaseObject'/> that this enumerator points /// to.</para> /// </summary> /// <value> /// <para>The current object in the enumeration.</para> /// </value> public ManagementBaseObject Current { get { if (isDisposed) throw new ObjectDisposedException(name); if (cacheIndex < 0) throw new InvalidOperationException(); return ManagementBaseObject.GetBaseObject (cachedObjects[cacheIndex], collectionObject.scope); } } /// <internalonly/> /// <summary> /// <para>Returns the current object in the enumeration.</para> /// </summary> /// <value> /// <para>The current object in the enumeration.</para> /// </value> object IEnumerator.Current { get { return Current; } } //**************************************** //MoveNext //**************************************** /// <summary> /// Indicates whether the enumerator has moved to /// the next object in the enumeration. /// </summary> /// <returns> /// <para><see langword='true'/>, if the enumerator was /// successfully advanced to the next element; <see langword='false'/> if the enumerator has /// passed the end of the collection.</para> /// </returns> public bool MoveNext () { if (isDisposed) throw new ObjectDisposedException(name); //If there are no more objects in the collection return false if (atEndOfCollection) return false; //Look for the next object cacheIndex++; if ((cachedCount - cacheIndex) == 0) //cache is empty - need to get more objects { //If the timeout is set to infinite, need to use the WMI infinite constant int timeout = (collectionObject.options.Timeout.Ticks == long.MaxValue) ? (int)tag_WBEM_TIMEOUT_TYPE.WBEM_INFINITE : (int)collectionObject.options.Timeout.TotalMilliseconds; //Get the next [BLockSize] objects within the specified timeout SecurityHandler securityHandler = collectionObject.scope.GetSecurityHandler(); //Because Interop doesn't support custom marshalling for arrays, we have to use //the "DoNotMarshal" objects in the interop and then convert to the "FreeThreaded" //counterparts afterwards. IWbemClassObject_DoNotMarshal[] tempArray = new IWbemClassObject_DoNotMarshal[collectionObject.options.BlockSize]; int status = collectionObject.scope.GetSecuredIEnumWbemClassObjectHandler(enumWbem ).Next_(timeout, (uint)collectionObject.options.BlockSize,tempArray, ref cachedCount); securityHandler.Reset(); if (status >= 0) { //Convert results and put them in cache. for (int i = 0; i < cachedCount; i++) { cachedObjects[i] = new IWbemClassObjectFreeThreaded ( Marshal.GetIUnknownForObject(tempArray[i]) ); } } if (status < 0) { if ((status & 0xfffff000) == 0x80041000) ManagementException.ThrowWithExtendedInfo((ManagementStatus)status); else Marshal.ThrowExceptionForHR(status, WmiNetUtilsHelper.GetErrorInfo_f()); } else { //If there was a timeout and no object can be returned we throw a timeout exception... if ((status == (int)tag_WBEMSTATUS.WBEM_S_TIMEDOUT) && (cachedCount == 0)) ManagementException.ThrowWithExtendedInfo((ManagementStatus)status); //If not timeout and no objects were returned - we're at the end of the collection if ((status == (int)tag_WBEMSTATUS.WBEM_S_FALSE) && (cachedCount == 0)) { atEndOfCollection = true; cacheIndex--; //back to last object /* This call to Dispose is being removed as per discussion with URT people and the newly supported * Dispose() call in the foreach implementation itself. * * //Release the COM object (so that the user doesn't have to) Dispose(); */ return false; } } cacheIndex = 0; } return true; } //**************************************** //Reset //**************************************** /// <summary> /// <para>Resets the enumerator to the beginning of the collection.</para> /// </summary> public void Reset () { if (isDisposed) throw new ObjectDisposedException(name); //If the collection is not rewindable you can't do this if (!collectionObject.options.Rewindable) throw new InvalidOperationException(); else { //Reset the WMI enumerator SecurityHandler securityHandler = collectionObject.scope.GetSecurityHandler(); int status = (int)ManagementStatus.NoError; try { status = collectionObject.scope.GetSecuredIEnumWbemClassObjectHandler(enumWbem).Reset_(); } catch (COMException e) { ManagementException.ThrowWithExtendedInfo (e); } finally { securityHandler.Reset (); } if ((status & 0xfffff000) == 0x80041000) { ManagementException.ThrowWithExtendedInfo((ManagementStatus)status); } else if ((status & 0x80000000) != 0) { Marshal.ThrowExceptionForHR(status, WmiNetUtilsHelper.GetErrorInfo_f()); } //Flush the current enumeration cache for (int i=(cacheIndex >= 0 ? cacheIndex : 0); i<cachedCount; i++) Marshal.ReleaseComObject((IWbemClassObject_DoNotMarshal)(Marshal.GetObjectForIUnknown(cachedObjects[i]))); cachedCount = 0; cacheIndex = -1; atEndOfCollection = false; } } } //ManagementObjectEnumerator class } //ManagementObjectCollection class }
40.966102
253
0.523414
[ "MIT" ]
Geotab/corefx
src/System.Management/src/System/Management/ManagementObjectCollection.cs
26,587
C#
using System; using System.Text.Json; using System.Text.Json.Serialization; using Xunit; namespace Dahomey.Json.Tests { public class JsonIgnoreTests { public class WeatherForecastWithJsonIgnore { public WeatherForecastWithJsonIgnore() { Summary = "No summary"; } public DateTimeOffset Date { get; set; } public int TemperatureCelsius { get; set; } [JsonIgnore] public string Summary { get; set; } } [Fact] public void TestRead() { JsonSerializerOptions options = new JsonSerializerOptions(); options.SetupExtensions(); const string json = @"{""Date"":""2019-08-01T00:00:00-07:00"",""TemperatureCelsius"":25}"; var weatherForecast = JsonSerializer.Deserialize<WeatherForecastWithJsonIgnore>(json, options); Assert.NotNull(weatherForecast); Assert.Equal("No summary", weatherForecast.Summary); } [Fact] public void TestWrite() { JsonSerializerOptions options = new JsonSerializerOptions(); options.SetupExtensions(); var weatherForecast = new WeatherForecastWithJsonIgnore { Date = DateTimeOffset.Parse("2019-08-01T00:00:00-07:00"), TemperatureCelsius = 25, Summary = "No summary" }; const string expected = @"{""Date"":""2019-08-01T00:00:00-07:00"",""TemperatureCelsius"":25}"; string actual = JsonSerializer.Serialize(weatherForecast, options); Assert.Equal(expected, actual); } #if NET5_0 public class MyClass { [JsonIgnore(Condition = JsonIgnoreCondition.Always)] public int Always { get; set; } [JsonIgnore(Condition = JsonIgnoreCondition.Never)] public int Never { get; set; } [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] public int WhenWritingDefault { get; set; } [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public object WhenWritingNull { get; set; } [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? WhenWritingNullableNull { get; set; } [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] public int? WhenWritingNullableValue { get; set; } = 123; } [Fact] public void TestWritingCondition() { JsonSerializerOptions options = new JsonSerializerOptions().SetupExtensions(); MyClass myClass = new MyClass { Always = 12, Never = 0, WhenWritingDefault = 0, WhenWritingNull = null, }; const string expected = @"{""Never"":0,""WhenWritingNullableValue"":123}"; string actual = JsonSerializer.Serialize(myClass, options); Assert.Equal(expected, actual); } #endif } }
30.960396
107
0.579149
[ "MIT" ]
transdevnl/Dahomey.Json
src/Dahomey.Json.Tests/JsonIgnoreTests.cs
3,129
C#
namespace DotsGame { // Возможные типы обработки пустых баз. public enum SurroundCondition { /// <summary> /// Классическая. /// </summary> Standart, /// <summary> /// Всегда захватывает тот игрок, в чье пустое окружение поставлена точка. /// </summary> Always, /// <summary> /// Захватывать даже пустые области. /// </summary> AlwaysEnemy } }
20.863636
82
0.525054
[ "Apache-2.0" ]
KvanTTT/Dots-Game-AI
DotsGame/SurroundCondition.cs
591
C#
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Threading; using System.Threading.Tasks; using Microsoft.AspNetCore; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; using Quartzmin; namespace AspNetCore3 { public class Program { public static void Main( string[] args ) { var scheduler = DemoScheduler.Create().Result; var host = WebHost.CreateDefaultBuilder( args ).Configure( app => { app.UseQuartzmin( new QuartzminOptions() { Scheduler = scheduler } ); } ).ConfigureServices( services => { services.AddQuartzmin(); } ) .Build(); host.Start(); while ( !scheduler.IsShutdown ) Thread.Sleep( 250 ); } } }
20.076923
74
0.707535
[ "MIT" ]
evgenykorolyuk/QuartzminNet5.0
Source/Examples/AspNetCore3/Program.cs
785
C#
using System; using System.IdentityModel.Tokens.Jwt; using System.Linq; using System.Security.Claims; using System.Text; using DotNetNote.Models; using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Configuration; using Microsoft.IdentityModel.Tokens; namespace DotNetNoteCom.Controllers { [Produces("application/json")] [Route("api/SignServices")] public class SignServicesController : Controller { private readonly ISignRepository _repository; private readonly IConfiguration _configuration; public SignServicesController(ISignRepository repository, IConfiguration configuration) { _repository = repository; _configuration = configuration; } /// <summary> /// 회원 로그인 /// </summary> [HttpPost("Login")] public IActionResult Login([FromBody] SignViewModel model) { if (!IsLogin(model)) { return NotFound("이메일 또는 암호가 틀립니다."); } string t = CreateToken(model); //return Ok(new { Token = t }); return Ok(new SignDto { Token = t, Email = model.Email }); } /// <summary> /// 회원 가입 /// </summary> [HttpPost("Register")] public IActionResult Register([FromBody] SignViewModel model) { var sign = _repository.AddSign(model); if (sign == null) { return NotFound("등록이되지 않았습니다."); } string t = CreateToken(model); return Ok(new SignDto { SignId = sign.SignId, Token = t, Email = model.Email }); } /// <summary> /// 토큰 생성 /// </summary> private string CreateToken(SignViewModel model) { //[1] 보안키 생성 var key = _configuration.GetSection("SymmetricSecurityKey").Value; var securityKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(key)); var signingCredentials = new SigningCredentials(securityKey, SecurityAlgorithms.HmacSha256); //[2] 클레임 생성 var claims = new Claim[] { new Claim(JwtRegisteredClaimNames.Sub, model.Email) }; //[3] 토큰 생성하기 var token = new JwtSecurityToken( claims: claims, signingCredentials: signingCredentials, expires: DateTime.Now.AddMinutes(5)); var t = new JwtSecurityTokenHandler().WriteToken(token); //[!] 토큰 반환 return t; } /// <summary> /// 로그인 처리: 이메일/암호가 맞으면 true 반환 /// </summary> private bool IsLogin(SignViewModel model) { //return true; // 일단 무조건 통과 return _repository.IsAuthenticated(model); } [HttpGet("LoginTest")] [Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme)] public IActionResult LoginTest() { //return Ok("인증된 사용자만 보는 내용"); return Ok(HttpContext.User.Claims.First().Value); // a@a.com } /// <summary> /// 회원 정보 /// </summary> /// <returns></returns> [HttpGet("Details")] [Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme)] public IActionResult GetSignByEmail() { // 클레임 정보에서 이메일 가져오기 var email = HttpContext.User.Claims.First().Value; // 현재 접속중인 사용자의 상세 정보 가져오기 var sign = _repository.GetSignByEmail(email); return Ok(sign); } } }
29.859375
96
0.562533
[ "MIT" ]
VisualAcademy/DotNetNoteV21
DotNetNote/DotNetNote/Controllers/Sign/SignServicesController.cs
4,074
C#
// Copyright (C) 2011, 2012 Zeno Gantner // Copyright (C) 2010 Steffen Rendle, Zeno Gantner // // This file is part of MyMediaLite. // // MyMediaLite is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // MyMediaLite is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with MyMediaLite. If not, see <http://www.gnu.org/licenses/>. using System; using System.Collections.Generic; using System.Linq; using MyMediaLite.DataType; namespace MyMediaLite.Correlation { /// <summary>Class for storing and computing conditional probabilities</summary> /// <remarks> /// </remarks> public sealed class ConditionalProbability : BinaryDataAsymmetricCorrelationMatrix { /// <summary>Creates an object of type ConditionalProbability</summary> /// <param name="num_entities">the number of entities</param> public ConditionalProbability(int num_entities) : base(num_entities) { } /// protected override float ComputeCorrelationFromOverlap(float overlap, float count_x, float count_y) { if (count_x != 0) return overlap / count_x; else return 0.0f; } } }
34.613636
101
0.745896
[ "BSD-3-Clause" ]
466152112/MyMediaLite
src/MyMediaLite/Correlation/ConditionalProbability.cs
1,523
C#
using System.Collections.Generic; using System.Linq; using DaData.Models.Suggestions.Results; using DaData.Models.Suggestions.ShortResponses; using DaData.Models.Suggestions.ShortsResults; namespace DaData.Models.Suggestions.Responses { public class EmailResponse : BaseResponse { public List<EmailResult> Suggestions { get; set; } public EmailShortResponse ToShortResponse() { return new EmailShortResponse { Suggestions = Suggestions.Select(x => new EmailShortResult { Domain = x.Data.Domain, Local = x.Data.Local, UnrestrictedValue = x.UnrestrictedValue, Value = x.Value }).ToList() }; } } }
29.814815
74
0.590062
[ "MIT" ]
Xambey/DaData.ApiClient
Dadata/Models/Suggestions/Responses/EmailResponse.cs
807
C#
using System.Collections.Generic; using System.Linq; using Xunit; namespace aoc.csharp.tests { public class PermutationsTests { [Fact] public void Generate1() { var expected = new List<int[]>() { new [] { 0 } }; var actual = Permutations.Generate(expected[0]).ToList(); Assert.Equal(expected, actual); } [Fact] public void Generate2() { var expected = new List<string[]>() { new [] { "one", "two" }, new [] { "two", "one" } }; var actual = Permutations.Generate(expected[0]).ToList(); Assert.Equal(expected, actual); } [Fact] public void Generate3() { var expected = new List<int[]>() { new [] { 0, 1, 2 }, new [] { 0, 2, 1 }, new [] { 1, 0, 2 }, new [] { 1, 2, 0 }, new [] { 2, 0, 1 }, new [] { 2, 1, 0 } }; var actual = Permutations.Generate(expected[0]).ToList(); Assert.Equal(expected, actual); } } }
22.672727
69
0.404972
[ "MIT" ]
zivkan/CodingForFun
AdventOfCode/aoc.csharp.tests/PermutationsTests.cs
1,249
C#
#pragma warning disable 162,168,649,660,661,1522 using System; using System.Text; using System.Collections.Generic; using System.Collections; using System.Collections.Concurrent; using System.Runtime.InteropServices; using System.Data; using System.IO; using System.Threading; using System.Threading.Tasks; using System.Runtime.ExceptionServices; using System.Security; using Trinity; using Trinity.Core.Lib; using Trinity.Storage; using Trinity.Utilities; using Trinity.TSL.Lib; using Trinity.Network; using Trinity.Network.Sockets; using Trinity.Network.Messaging; using Trinity.TSL; using System.Runtime.CompilerServices; using Trinity.Storage.Transaction; using Microsoft.Extensions.ObjectPool; namespace TDW.TRAServer { /// <summary> /// A .NET runtime object representation of UBL21_Invoice2_Cell defined in TSL. /// </summary> public partial struct UBL21_Invoice2_Cell : ICell { ///<summary> ///The id of the cell. ///</summary> public long CellId; ///<summary> ///Initializes a new instance of UBL21_Invoice2_Cell with the specified parameters. ///</summary> public UBL21_Invoice2_Cell(long cell_id , UBL21_Invoice2_Envelope envelope = default(UBL21_Invoice2_Envelope), TRACredential_EnvelopeSeal envelopeseal = default(TRACredential_EnvelopeSeal)) { this.envelope = envelope; this.envelopeseal = envelopeseal; CellId = cell_id; } ///<summary> ///Initializes a new instance of UBL21_Invoice2_Cell with the specified parameters. ///</summary> public UBL21_Invoice2_Cell( UBL21_Invoice2_Envelope envelope = default(UBL21_Invoice2_Envelope), TRACredential_EnvelopeSeal envelopeseal = default(TRACredential_EnvelopeSeal)) { this.envelope = envelope; this.envelopeseal = envelopeseal; CellId = CellIdFactory.NewCellId(); } public UBL21_Invoice2_Envelope envelope; public TRACredential_EnvelopeSeal envelopeseal; public static bool operator ==(UBL21_Invoice2_Cell a, UBL21_Invoice2_Cell b) { if (System.Object.ReferenceEquals(a, b)) { return true; } if (((object)a == null) || ((object)b == null)) { return false; } return (a.envelope == b.envelope) && (a.envelopeseal == b.envelopeseal) ; } public static bool operator !=(UBL21_Invoice2_Cell a, UBL21_Invoice2_Cell b) { return !(a == b); } #region Text processing /// <summary> /// Converts the string representation of a UBL21_Invoice2_Cell to its /// struct equivalent. A return value indicates whether the /// operation succeeded. /// </summary> /// <param name="input">A string to convert.</param> /// <param name="value"> /// When this method returns, contains the struct equivalent of the value contained /// in input, if the conversion succeeded, or default(UBL21_Invoice2_Cell) if the conversion /// failed. The conversion fails if the input parameter is null or String.Empty, or is /// not of the correct format. This parameter is passed uninitialized. /// </param> /// <returns> /// True if input was converted successfully; otherwise, false. /// </returns> public static bool TryParse(string input, out UBL21_Invoice2_Cell value) { try { value = Newtonsoft.Json.JsonConvert.DeserializeObject<UBL21_Invoice2_Cell>(input); return true; } catch { value = default(UBL21_Invoice2_Cell); return false; } } public static UBL21_Invoice2_Cell Parse(string input) { return Newtonsoft.Json.JsonConvert.DeserializeObject<UBL21_Invoice2_Cell>(input); } ///<summary>Converts a UBL21_Invoice2_Cell to its string representation, in JSON format.</summary> ///<returns>A string representation of the UBL21_Invoice2_Cell.</returns> public override string ToString() { return Serializer.ToString(this); } #endregion #region Lookup tables internal static StringLookupTable FieldLookupTable = new StringLookupTable( "envelope" , "envelopeseal" ); internal static HashSet<string> AppendToFieldRerouteSet = new HashSet<string>() { "envelope" , "envelopeseal" , }; #endregion #region ICell implementation /// <summary> /// Get the field of the specified name in the cell. /// </summary> /// <typeparam name="T"> /// The desired type that the field is supposed /// to be interpreted as. Automatic type casting /// will be attempted if the desired type is not /// implicitly convertible from the type of the field. /// </typeparam> /// <param name="fieldName">The name of the target field.</param> /// <returns>The value of the field.</returns> public T GetField<T>(string fieldName) { switch (FieldLookupTable.Lookup(fieldName)) { case -1: Throw.undefined_field(); break; case 0: return TypeConverter<T>.ConvertFrom_UBL21_Invoice2_Envelope(this.envelope); case 1: return TypeConverter<T>.ConvertFrom_TRACredential_EnvelopeSeal(this.envelopeseal); } /* Should not reach here */ throw new Exception("Internal error T5005"); } /// <summary> /// Set the value of the target field. /// </summary> /// <typeparam name="T"> /// The type of the value. /// </typeparam> /// <param name="fieldName">The name of the target field.</param> /// <param name="value"> /// The value of the field. Automatic type casting /// will be attempted if the desired type is not /// implicitly convertible from the type of the field. /// </param> public void SetField<T>(string fieldName, T value) { switch (FieldLookupTable.Lookup(fieldName)) { case -1: Throw.undefined_field(); break; case 0: this.envelope = TypeConverter<T>.ConvertTo_UBL21_Invoice2_Envelope(value); break; case 1: this.envelopeseal = TypeConverter<T>.ConvertTo_TRACredential_EnvelopeSeal(value); break; default: Throw.data_type_incompatible_with_field(typeof(T).ToString()); break; } } /// <summary> /// Tells if a field with the given name exists in the current cell. /// </summary> /// <param name="fieldName">The name of the field.</param> /// <returns>The existence of the field.</returns> public bool ContainsField(string fieldName) { switch (FieldLookupTable.Lookup(fieldName)) { case 0: return true; case 1: return true; default: return false; } } /// <summary> /// Append <paramref name="value"/> to the target field. Note that if the target field /// is not appendable(string or list), calling this method is equivalent to <see cref="TDW.TRAServer.GenericCellAccessor.SetField(string, T)"/>. /// </summary> /// <typeparam name="T"> /// The type of the value. /// </typeparam> /// <param name="fieldName">The name of the target field.</param> /// <param name="value">The value to be appended. /// If the value is incompatible with the element /// type of the field, automatic type casting will be attempted. /// </param> public void AppendToField<T>(string fieldName, T value) { if (AppendToFieldRerouteSet.Contains(fieldName)) { SetField(fieldName, value); return; } switch (FieldLookupTable.Lookup(fieldName)) { case -1: Throw.undefined_field(); break; default: Throw.target__field_not_list(); break; } } long ICell.CellId { get { return CellId; } set { CellId = value; } } public IEnumerable<KeyValuePair<string, T>> SelectFields<T>(string attributeKey, string attributeValue) { switch (TypeConverter<T>.type_id) { case 4: if (StorageSchema.UBL21_Invoice2_Cell_descriptor.check_attribute(StorageSchema.UBL21_Invoice2_Cell_descriptor.envelope, attributeKey, attributeValue)) yield return new KeyValuePair<string, T>("envelope", TypeConverter<T>.ConvertFrom_UBL21_Invoice2_Envelope(this.envelope)); if (StorageSchema.UBL21_Invoice2_Cell_descriptor.check_attribute(StorageSchema.UBL21_Invoice2_Cell_descriptor.envelopeseal, attributeKey, attributeValue)) yield return new KeyValuePair<string, T>("envelopeseal", TypeConverter<T>.ConvertFrom_TRACredential_EnvelopeSeal(this.envelopeseal)); break; case 5: if (StorageSchema.UBL21_Invoice2_Cell_descriptor.check_attribute(StorageSchema.UBL21_Invoice2_Cell_descriptor.envelope, attributeKey, attributeValue)) yield return new KeyValuePair<string, T>("envelope", TypeConverter<T>.ConvertFrom_UBL21_Invoice2_Envelope(this.envelope)); if (StorageSchema.UBL21_Invoice2_Cell_descriptor.check_attribute(StorageSchema.UBL21_Invoice2_Cell_descriptor.envelopeseal, attributeKey, attributeValue)) yield return new KeyValuePair<string, T>("envelopeseal", TypeConverter<T>.ConvertFrom_TRACredential_EnvelopeSeal(this.envelopeseal)); break; case 76: if (StorageSchema.UBL21_Invoice2_Cell_descriptor.check_attribute(StorageSchema.UBL21_Invoice2_Cell_descriptor.envelopeseal, attributeKey, attributeValue)) yield return new KeyValuePair<string, T>("envelopeseal", TypeConverter<T>.ConvertFrom_TRACredential_EnvelopeSeal(this.envelopeseal)); break; case 90: if (StorageSchema.UBL21_Invoice2_Cell_descriptor.check_attribute(StorageSchema.UBL21_Invoice2_Cell_descriptor.envelope, attributeKey, attributeValue)) yield return new KeyValuePair<string, T>("envelope", TypeConverter<T>.ConvertFrom_UBL21_Invoice2_Envelope(this.envelope)); break; case 96: if (StorageSchema.UBL21_Invoice2_Cell_descriptor.check_attribute(StorageSchema.UBL21_Invoice2_Cell_descriptor.envelope, attributeKey, attributeValue)) yield return new KeyValuePair<string, T>("envelope", TypeConverter<T>.ConvertFrom_UBL21_Invoice2_Envelope(this.envelope)); if (StorageSchema.UBL21_Invoice2_Cell_descriptor.check_attribute(StorageSchema.UBL21_Invoice2_Cell_descriptor.envelopeseal, attributeKey, attributeValue)) yield return new KeyValuePair<string, T>("envelopeseal", TypeConverter<T>.ConvertFrom_TRACredential_EnvelopeSeal(this.envelopeseal)); break; default: Throw.incompatible_with_cell(); break; } yield break; } #region enumerate value constructs private IEnumerable<T> _enumerate_from_envelope<T>() { switch (TypeConverter<T>.type_id) { case 4: { yield return TypeConverter<T>.ConvertFrom_UBL21_Invoice2_Envelope(this.envelope); } break; case 5: { yield return TypeConverter<T>.ConvertFrom_UBL21_Invoice2_Envelope(this.envelope); } break; case 90: { yield return TypeConverter<T>.ConvertFrom_UBL21_Invoice2_Envelope(this.envelope); } break; case 96: { yield return TypeConverter<T>.ConvertFrom_UBL21_Invoice2_Envelope(this.envelope); } break; default: Throw.incompatible_with_cell(); break; } yield break; } private IEnumerable<T> _enumerate_from_envelopeseal<T>() { switch (TypeConverter<T>.type_id) { case 4: { yield return TypeConverter<T>.ConvertFrom_TRACredential_EnvelopeSeal(this.envelopeseal); } break; case 5: { yield return TypeConverter<T>.ConvertFrom_TRACredential_EnvelopeSeal(this.envelopeseal); } break; case 76: { yield return TypeConverter<T>.ConvertFrom_TRACredential_EnvelopeSeal(this.envelopeseal); } break; case 96: { yield return TypeConverter<T>.ConvertFrom_TRACredential_EnvelopeSeal(this.envelopeseal); } break; default: Throw.incompatible_with_cell(); break; } yield break; } private static StringLookupTable s_field_attribute_id_table = new StringLookupTable( ); #endregion public IEnumerable<T> EnumerateField<T>(string fieldName) { switch (FieldLookupTable.Lookup(fieldName)) { case 0: return _enumerate_from_envelope<T>(); case 1: return _enumerate_from_envelopeseal<T>(); default: Throw.undefined_field(); return null; } } public IEnumerable<T> EnumerateValues<T>(string attributeKey, string attributeValue) { int attr_id; if (attributeKey == null) { foreach (var val in _enumerate_from_envelope<T>()) yield return val; foreach (var val in _enumerate_from_envelopeseal<T>()) yield return val; } else if (-1 != (attr_id = s_field_attribute_id_table.Lookup(attributeKey))) { switch (attr_id) { } } yield break; } public ICellAccessor Serialize() { return (UBL21_Invoice2_Cell_Accessor)this; } #endregion #region Other interfaces string ITypeDescriptor.TypeName { get { return StorageSchema.s_cellTypeName_UBL21_Invoice2_Cell; } } Type ITypeDescriptor.Type { get { return StorageSchema.s_cellType_UBL21_Invoice2_Cell; } } bool ITypeDescriptor.IsOfType<T>() { return typeof(T) == StorageSchema.s_cellType_UBL21_Invoice2_Cell; } bool ITypeDescriptor.IsList() { return false; } IEnumerable<IFieldDescriptor> ICellDescriptor.GetFieldDescriptors() { return StorageSchema.UBL21_Invoice2_Cell.GetFieldDescriptors(); } IAttributeCollection ICellDescriptor.GetFieldAttributes(string fieldName) { return StorageSchema.UBL21_Invoice2_Cell.GetFieldAttributes(fieldName); } string IAttributeCollection.GetAttributeValue(string attributeKey) { return StorageSchema.UBL21_Invoice2_Cell.GetAttributeValue(attributeKey); } IReadOnlyDictionary<string, string> IAttributeCollection.Attributes { get { return StorageSchema.UBL21_Invoice2_Cell.Attributes; } } IEnumerable<string> ICellDescriptor.GetFieldNames() { { yield return "envelope"; } { yield return "envelopeseal"; } } ushort ICellDescriptor.CellType { get { return (ushort)CellType.UBL21_Invoice2_Cell; } } #endregion } /// <summary> /// Provides in-place operations of UBL21_Invoice2_Cell defined in TSL. /// </summary> public unsafe class UBL21_Invoice2_Cell_Accessor : ICellAccessor { #region Fields internal long m_cellId; /// <summary> /// A pointer to the underlying raw binary blob. Take caution when accessing data with /// the raw pointer, as no boundary checks are employed, and improper operations will cause data corruption and/or system crash. /// </summary> internal byte* m_ptr; internal LocalTransactionContext m_tx; internal int m_cellEntryIndex; internal CellAccessOptions m_options; internal bool m_IsIterator; private const CellAccessOptions c_WALFlags = CellAccessOptions.StrongLogAhead | CellAccessOptions.WeakLogAhead; #endregion #region Constructors private unsafe UBL21_Invoice2_Cell_Accessor() { envelope_Accessor_Field = new UBL21_Invoice2_Envelope_Accessor(null, (ptr,ptr_offset,delta)=> { int substructure_offset = (int)(ptr - this.m_ptr); this.ResizeFunction(this.m_ptr, ptr_offset + substructure_offset, delta); return this.m_ptr + substructure_offset; }); envelopeseal_Accessor_Field = new TRACredential_EnvelopeSeal_Accessor(null, (ptr,ptr_offset,delta)=> { int substructure_offset = (int)(ptr - this.m_ptr); this.ResizeFunction(this.m_ptr, ptr_offset + substructure_offset, delta); return this.m_ptr + substructure_offset; }); } #endregion internal static string[] optional_field_names = null; ///<summary> ///Get an array of the names of all optional fields for object type t_struct_name. ///</summary> public static string[] GetOptionalFieldNames() { if (optional_field_names == null) optional_field_names = new string[] { }; return optional_field_names; } ///<summary> ///Get a list of the names of available optional fields in the object being operated by this accessor. ///</summary> internal List<string> GetNotNullOptionalFields() { List<string> list = new List<string>(); BitArray ba = new BitArray(GetOptionalFieldMap()); string[] optional_fields = GetOptionalFieldNames(); for (int i = 0; i < ba.Count; i++) { if (ba[i]) list.Add(optional_fields[i]); } return list; } internal unsafe byte[] GetOptionalFieldMap() { return new byte[0]; } #region IAccessor Implementation public byte[] ToByteArray() { byte* targetPtr = m_ptr; {{{ byte* optheader_4 = targetPtr; targetPtr += 1; targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int); if ((0 != (*(optheader_4 + 0) & 0x01))) { targetPtr += *(int*)targetPtr + sizeof(int); } if ((0 != (*(optheader_4 + 0) & 0x02))) { {targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; {targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int);}{ targetPtr += 1; targetPtr += *(int*)targetPtr + sizeof(int);} targetPtr += 8; {targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int);}targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 16; {targetPtr += *(int*)targetPtr + sizeof(int);}{ byte* optheader_8 = targetPtr; targetPtr += 1; targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int); if ((0 != (*(optheader_8 + 0) & 0x01))) { {targetPtr += *(int*)targetPtr + sizeof(int);} } }targetPtr += *(int*)targetPtr + sizeof(int);{targetPtr += *(int*)targetPtr + sizeof(int);}{targetPtr += *(int*)targetPtr + sizeof(int);}{targetPtr += *(int*)targetPtr + sizeof(int);}{ targetPtr += 8; {{ byte* optheader_12 = targetPtr; targetPtr += 1; targetPtr += *(int*)targetPtr + sizeof(int); if ((0 != (*(optheader_12 + 0) & 0x01))) { targetPtr += *(int*)targetPtr + sizeof(int); } targetPtr += *(int*)targetPtr + sizeof(int);}targetPtr += *(int*)targetPtr + sizeof(int);}}targetPtr += *(int*)targetPtr + sizeof(int);{{ targetPtr += 1; targetPtr += *(int*)targetPtr + sizeof(int);}}targetPtr += *(int*)targetPtr + sizeof(int);{{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }targetPtr += *(int*)targetPtr + sizeof(int);}{{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }}targetPtr += *(int*)targetPtr + sizeof(int);} } if ((0 != (*(optheader_4 + 0) & 0x04))) { {targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int);} } }{ byte* optheader_4 = targetPtr; targetPtr += 1; targetPtr += 11; targetPtr += *(int*)targetPtr + sizeof(int); if ((0 != (*(optheader_4 + 0) & 0x01))) { targetPtr += *(int*)targetPtr + sizeof(int); } if ((0 != (*(optheader_4 + 0) & 0x02))) { targetPtr += *(int*)targetPtr + sizeof(int); } }}{ byte* optheader_2 = targetPtr; targetPtr += 1; if ((0 != (*(optheader_2 + 0) & 0x01))) { targetPtr += *(int*)targetPtr + sizeof(int); } if ((0 != (*(optheader_2 + 0) & 0x02))) { targetPtr += *(int*)targetPtr + sizeof(int); } if ((0 != (*(optheader_2 + 0) & 0x04))) { targetPtr += *(int*)targetPtr + sizeof(int); } if ((0 != (*(optheader_2 + 0) & 0x08))) { targetPtr += *(int*)targetPtr + sizeof(int); } }} int size = (int)(targetPtr - m_ptr); byte[] ret = new byte[size]; Memory.Copy(m_ptr, 0, ret, 0, size); return ret; } public unsafe byte* GetUnderlyingBufferPointer() { return m_ptr; } public unsafe int GetBufferLength() { byte* targetPtr = m_ptr; {{{ byte* optheader_4 = targetPtr; targetPtr += 1; targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int); if ((0 != (*(optheader_4 + 0) & 0x01))) { targetPtr += *(int*)targetPtr + sizeof(int); } if ((0 != (*(optheader_4 + 0) & 0x02))) { {targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; {targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int);}{ targetPtr += 1; targetPtr += *(int*)targetPtr + sizeof(int);} targetPtr += 8; {targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int);}targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 16; {targetPtr += *(int*)targetPtr + sizeof(int);}{ byte* optheader_8 = targetPtr; targetPtr += 1; targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int); if ((0 != (*(optheader_8 + 0) & 0x01))) { {targetPtr += *(int*)targetPtr + sizeof(int);} } }targetPtr += *(int*)targetPtr + sizeof(int);{targetPtr += *(int*)targetPtr + sizeof(int);}{targetPtr += *(int*)targetPtr + sizeof(int);}{targetPtr += *(int*)targetPtr + sizeof(int);}{ targetPtr += 8; {{ byte* optheader_12 = targetPtr; targetPtr += 1; targetPtr += *(int*)targetPtr + sizeof(int); if ((0 != (*(optheader_12 + 0) & 0x01))) { targetPtr += *(int*)targetPtr + sizeof(int); } targetPtr += *(int*)targetPtr + sizeof(int);}targetPtr += *(int*)targetPtr + sizeof(int);}}targetPtr += *(int*)targetPtr + sizeof(int);{{ targetPtr += 1; targetPtr += *(int*)targetPtr + sizeof(int);}}targetPtr += *(int*)targetPtr + sizeof(int);{{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }targetPtr += *(int*)targetPtr + sizeof(int);}{{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }}targetPtr += *(int*)targetPtr + sizeof(int);} } if ((0 != (*(optheader_4 + 0) & 0x04))) { {targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int);} } }{ byte* optheader_4 = targetPtr; targetPtr += 1; targetPtr += 11; targetPtr += *(int*)targetPtr + sizeof(int); if ((0 != (*(optheader_4 + 0) & 0x01))) { targetPtr += *(int*)targetPtr + sizeof(int); } if ((0 != (*(optheader_4 + 0) & 0x02))) { targetPtr += *(int*)targetPtr + sizeof(int); } }}{ byte* optheader_2 = targetPtr; targetPtr += 1; if ((0 != (*(optheader_2 + 0) & 0x01))) { targetPtr += *(int*)targetPtr + sizeof(int); } if ((0 != (*(optheader_2 + 0) & 0x02))) { targetPtr += *(int*)targetPtr + sizeof(int); } if ((0 != (*(optheader_2 + 0) & 0x04))) { targetPtr += *(int*)targetPtr + sizeof(int); } if ((0 != (*(optheader_2 + 0) & 0x08))) { targetPtr += *(int*)targetPtr + sizeof(int); } }} int size = (int)(targetPtr - m_ptr); return size; } public ResizeFunctionDelegate ResizeFunction { get; set; } #endregion private static byte[] s_default_content = null; private static unsafe byte[] construct( UBL21_Invoice2_Envelope envelope = default(UBL21_Invoice2_Envelope) , TRACredential_EnvelopeSeal envelopeseal = default(TRACredential_EnvelopeSeal) ) { if (s_default_content != null) return s_default_content; byte* targetPtr; targetPtr = null; { { { targetPtr += 1; if(envelope.content.udid!= null) { int strlen_4 = envelope.content.udid.Length * 2; targetPtr += strlen_4+sizeof(int); }else { targetPtr += sizeof(int); } { targetPtr += sizeof(int); if(envelope.content.context!= null) { for(int iterator_4 = 0;iterator_4<envelope.content.context.Count;++iterator_4) { if(envelope.content.context[iterator_4]!= null) { int strlen_5 = envelope.content.context[iterator_4].Length * 2; targetPtr += strlen_5+sizeof(int); }else { targetPtr += sizeof(int); } } } } if( envelope.content.credentialsubjectudid!= null) { if(envelope.content.credentialsubjectudid!= null) { int strlen_4 = envelope.content.credentialsubjectudid.Length * 2; targetPtr += strlen_4+sizeof(int); }else { targetPtr += sizeof(int); } } if( envelope.content.claims!= null) { { if(envelope.content.claims.Value.cbc_UBLVersionID!= null) { int strlen_5 = envelope.content.claims.Value.cbc_UBLVersionID.Length * 2; targetPtr += strlen_5+sizeof(int); }else { targetPtr += sizeof(int); } if(envelope.content.claims.Value.cbc_ID!= null) { int strlen_5 = envelope.content.claims.Value.cbc_ID.Length * 2; targetPtr += strlen_5+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; { if(envelope.content.claims.Value.cbc_InvoiceTypeCode._listID!= null) { int strlen_6 = envelope.content.claims.Value.cbc_InvoiceTypeCode._listID.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } if(envelope.content.claims.Value.cbc_InvoiceTypeCode._listAgencyID!= null) { int strlen_6 = envelope.content.claims.Value.cbc_InvoiceTypeCode._listAgencyID.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } if(envelope.content.claims.Value.cbc_InvoiceTypeCode.code!= null) { int strlen_6 = envelope.content.claims.Value.cbc_InvoiceTypeCode.code.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } } { targetPtr += 1; if(envelope.content.claims.Value.cbc_Note.note!= null) { int strlen_6 = envelope.content.claims.Value.cbc_Note.note.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } }targetPtr += 8; { if(envelope.content.claims.Value.cbc_DocumentCurrencyCode._listID!= null) { int strlen_6 = envelope.content.claims.Value.cbc_DocumentCurrencyCode._listID.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } if(envelope.content.claims.Value.cbc_DocumentCurrencyCode._listAgencyID!= null) { int strlen_6 = envelope.content.claims.Value.cbc_DocumentCurrencyCode._listAgencyID.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } if(envelope.content.claims.Value.cbc_DocumentCurrencyCode.code!= null) { int strlen_6 = envelope.content.claims.Value.cbc_DocumentCurrencyCode.code.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } } if(envelope.content.claims.Value.cbc_AccountingCost!= null) { int strlen_5 = envelope.content.claims.Value.cbc_AccountingCost.Length * 2; targetPtr += strlen_5+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 16; { if(envelope.content.claims.Value.cbc_OrderReference.cbc_ID!= null) { int strlen_6 = envelope.content.claims.Value.cbc_OrderReference.cbc_ID.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } } { targetPtr += 1; if(envelope.content.claims.Value.cac_ContractDocumentReference.ID!= null) { int strlen_6 = envelope.content.claims.Value.cac_ContractDocumentReference.ID.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } if(envelope.content.claims.Value.cac_ContractDocumentReference.DocumentType!= null) { int strlen_6 = envelope.content.claims.Value.cac_ContractDocumentReference.DocumentType.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_ContractDocumentReference.cac_Attachment!= null) { { if(envelope.content.claims.Value.cac_ContractDocumentReference.cac_Attachment.Value.cac_ExternalReferenceUdid!= null) { int strlen_7 = envelope.content.claims.Value.cac_ContractDocumentReference.cac_Attachment.Value.cac_ExternalReferenceUdid.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } } } } { targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_AdditionalDocumentReferences!= null) { for(int iterator_5 = 0;iterator_5<envelope.content.claims.Value.cac_AdditionalDocumentReferences.Count;++iterator_5) { { targetPtr += 1; if(envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].ID!= null) { int strlen_7 = envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].ID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } if(envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].DocumentType!= null) { int strlen_7 = envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].DocumentType.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].cac_Attachment!= null) { { if(envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].cac_Attachment.Value.cac_ExternalReferenceUdid!= null) { int strlen_8 = envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].cac_Attachment.Value.cac_ExternalReferenceUdid.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } } } } } } } { if(envelope.content.claims.Value.cac_AccountingSupplierParty.cac_PartyUdid!= null) { int strlen_6 = envelope.content.claims.Value.cac_AccountingSupplierParty.cac_PartyUdid.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } } { if(envelope.content.claims.Value.cac_AccountingCustomerParty.cac_PartyUdid!= null) { int strlen_6 = envelope.content.claims.Value.cac_AccountingCustomerParty.cac_PartyUdid.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } } { if(envelope.content.claims.Value.cac_PayeeParty.cac_PartyUdid!= null) { int strlen_6 = envelope.content.claims.Value.cac_PayeeParty.cac_PartyUdid.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } } { targetPtr += 8; { { targetPtr += 1; if(envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeID!= null) { int strlen_8 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeID.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeAgencyID!= null) { if(envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeAgencyID!= null) { int strlen_8 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeAgencyID.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } } if(envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID.code!= null) { int strlen_8 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID.code.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } } if(envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cac_AddressUdid!= null) { int strlen_7 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cac_AddressUdid.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } } } if(envelope.content.claims.Value.cac_PaymentMeansUdid!= null) { int strlen_5 = envelope.content.claims.Value.cac_PaymentMeansUdid.Length * 2; targetPtr += strlen_5+sizeof(int); }else { targetPtr += sizeof(int); } { { targetPtr += 1; if(envelope.content.claims.Value.cac_PaymentTerms.cbc_Note.note!= null) { int strlen_7 = envelope.content.claims.Value.cac_PaymentTerms.cbc_Note.note.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } } } { targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_AllowanceCharges!= null) { for(int iterator_5 = 0;iterator_5<envelope.content.claims.Value.cac_AllowanceCharges.Count;++iterator_5) { { targetPtr += 1; if(envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_AllowanceChargeReason!= null) { int strlen_7 = envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_AllowanceChargeReason.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } { if(envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_Amount._CurrencyID!= null) { int strlen_8 = envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_Amount._CurrencyID.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } } } } } { { if(envelope.content.claims.Value.cac_TaxTotal.cbc_TaxAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_TaxTotal.cbc_TaxAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals!= null) { for(int iterator_6 = 0;iterator_6<envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals.Count;++iterator_6) { { { if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxableAmount._CurrencyID!= null) { int strlen_9 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxableAmount._CurrencyID.Length * 2; targetPtr += strlen_9+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxAmount._CurrencyID!= null) { int strlen_9 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxAmount._CurrencyID.Length * 2; targetPtr += strlen_9+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { { targetPtr += 1; if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeID!= null) { int strlen_10 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeID.Length * 2; targetPtr += strlen_10+sizeof(int); }else { targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeAgencyID!= null) { if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeAgencyID!= null) { int strlen_10 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeAgencyID.Length * 2; targetPtr += strlen_10+sizeof(int); }else { targetPtr += sizeof(int); } } if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID.code!= null) { int strlen_10 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID.code.Length * 2; targetPtr += strlen_10+sizeof(int); }else { targetPtr += sizeof(int); } } targetPtr += 8; { { targetPtr += 1; if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID!= null) { int strlen_11 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID.Length * 2; targetPtr += strlen_11+sizeof(int); }else { targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID!= null) { if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID!= null) { int strlen_11 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID.Length * 2; targetPtr += strlen_11+sizeof(int); }else { targetPtr += sizeof(int); } } if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID.code!= null) { int strlen_11 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID.code.Length * 2; targetPtr += strlen_11+sizeof(int); }else { targetPtr += sizeof(int); } } } } } } } } } { { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_LineExtensionAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_LineExtensionAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxExclusiveAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxExclusiveAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxInclusiveAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxInclusiveAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_AllowanceTotalAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_AllowanceTotalAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_ChargeTotalAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_ChargeTotalAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PrepaidAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PrepaidAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableRoundingAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableRoundingAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } } { targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_InvoiceLine!= null) { for(int iterator_5 = 0;iterator_5<envelope.content.claims.Value.cac_InvoiceLine.Count;++iterator_5) { { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_ID!= null) { int strlen_7 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_ID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } { targetPtr += 1; if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_Note.note!= null) { int strlen_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_Note.note.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_InvoicedQuantity._unitCode!= null) { int strlen_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_InvoicedQuantity._unitCode.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_LineExtensionAmount._CurrencyID!= null) { int strlen_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_LineExtensionAmount._CurrencyID.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_AccountingCost!= null) { int strlen_7 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_AccountingCost.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_OrderLineReference.cbc_LineID!= null) { int strlen_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_OrderLineReference.cbc_LineID.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } } { targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges!= null) { for(int iterator_7 = 0;iterator_7<envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges.Count;++iterator_7) { { targetPtr += 1; if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_AllowanceChargeReason!= null) { int strlen_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_AllowanceChargeReason.Length * 2; targetPtr += strlen_9+sizeof(int); }else { targetPtr += sizeof(int); } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_Amount._CurrencyID!= null) { int strlen_10 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_Amount._CurrencyID.Length * 2; targetPtr += strlen_10+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } } } } } { { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cbc_TaxAmount._CurrencyID!= null) { int strlen_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cbc_TaxAmount._CurrencyID.Length * 2; targetPtr += strlen_9+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals!= null) { for(int iterator_8 = 0;iterator_8<envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals.Count;++iterator_8) { { { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxableAmount._CurrencyID!= null) { int strlen_11 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxableAmount._CurrencyID.Length * 2; targetPtr += strlen_11+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxAmount._CurrencyID!= null) { int strlen_11 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxAmount._CurrencyID.Length * 2; targetPtr += strlen_11+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { { targetPtr += 1; if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeID!= null) { int strlen_12 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeID.Length * 2; targetPtr += strlen_12+sizeof(int); }else { targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeAgencyID!= null) { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeAgencyID!= null) { int strlen_12 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeAgencyID.Length * 2; targetPtr += strlen_12+sizeof(int); }else { targetPtr += sizeof(int); } } if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID.code!= null) { int strlen_12 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID.code.Length * 2; targetPtr += strlen_12+sizeof(int); }else { targetPtr += sizeof(int); } } targetPtr += 8; { { targetPtr += 1; if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID!= null) { int strlen_13 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID.Length * 2; targetPtr += strlen_13+sizeof(int); }else { targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID!= null) { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID!= null) { int strlen_13 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID.Length * 2; targetPtr += strlen_13+sizeof(int); }else { targetPtr += sizeof(int); } } if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID.code!= null) { int strlen_13 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID.code.Length * 2; targetPtr += strlen_13+sizeof(int); }else { targetPtr += sizeof(int); } } } } } } } } } if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_ItemUdid!= null) { int strlen_7 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_ItemUdid.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } { { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_PriceAmount._CurrencyID!= null) { int strlen_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_PriceAmount._CurrencyID.Length * 2; targetPtr += strlen_9+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_BaseQuantity._unitCode!= null) { int strlen_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_BaseQuantity._unitCode.Length * 2; targetPtr += strlen_9+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { targetPtr += 1; if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_AllowanceChargeReason!= null) { int strlen_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_AllowanceChargeReason.Length * 2; targetPtr += strlen_9+sizeof(int); }else { targetPtr += sizeof(int); } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_Amount._CurrencyID!= null) { int strlen_10 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_Amount._CurrencyID.Length * 2; targetPtr += strlen_10+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } } } } } } } } } if( envelope.content.encryptedclaims!= null) { { if(envelope.content.encryptedclaims.Value.ciphertext16!= null) { int strlen_5 = envelope.content.encryptedclaims.Value.ciphertext16.Length * 2; targetPtr += strlen_5+sizeof(int); }else { targetPtr += sizeof(int); } if(envelope.content.encryptedclaims.Value.alg!= null) { int strlen_5 = envelope.content.encryptedclaims.Value.alg.Length * 2; targetPtr += strlen_5+sizeof(int); }else { targetPtr += sizeof(int); } if(envelope.content.encryptedclaims.Value.key!= null) { int strlen_5 = envelope.content.encryptedclaims.Value.key.Length * 2; targetPtr += strlen_5+sizeof(int); }else { targetPtr += sizeof(int); } } } } { targetPtr += 1; targetPtr += 1; targetPtr += 8; targetPtr += 1; targetPtr += 1; if(envelope.label.notaryudid!= null) { int strlen_4 = envelope.label.notaryudid.Length * 2; targetPtr += strlen_4+sizeof(int); }else { targetPtr += sizeof(int); } if( envelope.label.name!= null) { if(envelope.label.name!= null) { int strlen_4 = envelope.label.name.Length * 2; targetPtr += strlen_4+sizeof(int); }else { targetPtr += sizeof(int); } } if( envelope.label.comment!= null) { if(envelope.label.comment!= null) { int strlen_4 = envelope.label.comment.Length * 2; targetPtr += strlen_4+sizeof(int); }else { targetPtr += sizeof(int); } } } } { targetPtr += 1; if( envelopeseal.hashedThumbprint64!= null) { if(envelopeseal.hashedThumbprint64!= null) { int strlen_3 = envelopeseal.hashedThumbprint64.Length * 2; targetPtr += strlen_3+sizeof(int); }else { targetPtr += sizeof(int); } } if( envelopeseal.signedHashSignature64!= null) { if(envelopeseal.signedHashSignature64!= null) { int strlen_3 = envelopeseal.signedHashSignature64.Length * 2; targetPtr += strlen_3+sizeof(int); }else { targetPtr += sizeof(int); } } if( envelopeseal.notaryStamp!= null) { if(envelopeseal.notaryStamp!= null) { int strlen_3 = envelopeseal.notaryStamp.Length * 2; targetPtr += strlen_3+sizeof(int); }else { targetPtr += sizeof(int); } } if( envelopeseal.comments!= null) { { targetPtr += sizeof(int); if(envelopeseal.comments!= null) { for(int iterator_3 = 0;iterator_3<envelopeseal.comments.Count;++iterator_3) { if(envelopeseal.comments[iterator_3]!= null) { int strlen_4 = envelopeseal.comments[iterator_3].Length * 2; targetPtr += strlen_4+sizeof(int); }else { targetPtr += sizeof(int); } } } } } } } byte[] tmpcell = new byte[(int)(targetPtr)]; fixed (byte* _tmpcellptr = tmpcell) { targetPtr = _tmpcellptr; { { { byte* optheader_3 = targetPtr; *(optheader_3 + 0) = 0x00; targetPtr += 1; if(envelope.content.udid!= null) { int strlen_4 = envelope.content.udid.Length * 2; *(int*)targetPtr = strlen_4; targetPtr += sizeof(int); fixed(char* pstr_4 = envelope.content.udid) { Memory.Copy(pstr_4, targetPtr, strlen_4); targetPtr += strlen_4; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { byte *storedPtr_4 = targetPtr; targetPtr += sizeof(int); if(envelope.content.context!= null) { for(int iterator_4 = 0;iterator_4<envelope.content.context.Count;++iterator_4) { if(envelope.content.context[iterator_4]!= null) { int strlen_5 = envelope.content.context[iterator_4].Length * 2; *(int*)targetPtr = strlen_5; targetPtr += sizeof(int); fixed(char* pstr_5 = envelope.content.context[iterator_4]) { Memory.Copy(pstr_5, targetPtr, strlen_5); targetPtr += strlen_5; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } } *(int*)storedPtr_4 = (int)(targetPtr - storedPtr_4 - 4); } if( envelope.content.credentialsubjectudid!= null) { if(envelope.content.credentialsubjectudid!= null) { int strlen_4 = envelope.content.credentialsubjectudid.Length * 2; *(int*)targetPtr = strlen_4; targetPtr += sizeof(int); fixed(char* pstr_4 = envelope.content.credentialsubjectudid) { Memory.Copy(pstr_4, targetPtr, strlen_4); targetPtr += strlen_4; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_3 + 0) |= 0x01; } if( envelope.content.claims!= null) { { if(envelope.content.claims.Value.cbc_UBLVersionID!= null) { int strlen_5 = envelope.content.claims.Value.cbc_UBLVersionID.Length * 2; *(int*)targetPtr = strlen_5; targetPtr += sizeof(int); fixed(char* pstr_5 = envelope.content.claims.Value.cbc_UBLVersionID) { Memory.Copy(pstr_5, targetPtr, strlen_5); targetPtr += strlen_5; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(envelope.content.claims.Value.cbc_ID!= null) { int strlen_5 = envelope.content.claims.Value.cbc_ID.Length * 2; *(int*)targetPtr = strlen_5; targetPtr += sizeof(int); fixed(char* pstr_5 = envelope.content.claims.Value.cbc_ID) { Memory.Copy(pstr_5, targetPtr, strlen_5); targetPtr += strlen_5; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { *(long*)targetPtr = envelope.content.claims.Value.cbc_IssueDate.ToBinary(); targetPtr += 8; } { if(envelope.content.claims.Value.cbc_InvoiceTypeCode._listID!= null) { int strlen_6 = envelope.content.claims.Value.cbc_InvoiceTypeCode._listID.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cbc_InvoiceTypeCode._listID) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(envelope.content.claims.Value.cbc_InvoiceTypeCode._listAgencyID!= null) { int strlen_6 = envelope.content.claims.Value.cbc_InvoiceTypeCode._listAgencyID.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cbc_InvoiceTypeCode._listAgencyID) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(envelope.content.claims.Value.cbc_InvoiceTypeCode.code!= null) { int strlen_6 = envelope.content.claims.Value.cbc_InvoiceTypeCode.code.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cbc_InvoiceTypeCode.code) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } { *(ISO639_1_LanguageCodes*)targetPtr = envelope.content.claims.Value.cbc_Note._languageID; targetPtr += 1; if(envelope.content.claims.Value.cbc_Note.note!= null) { int strlen_6 = envelope.content.claims.Value.cbc_Note.note.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cbc_Note.note) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } { *(long*)targetPtr = envelope.content.claims.Value.cbc_TaxPointDate.ToBinary(); targetPtr += 8; } { if(envelope.content.claims.Value.cbc_DocumentCurrencyCode._listID!= null) { int strlen_6 = envelope.content.claims.Value.cbc_DocumentCurrencyCode._listID.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cbc_DocumentCurrencyCode._listID) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(envelope.content.claims.Value.cbc_DocumentCurrencyCode._listAgencyID!= null) { int strlen_6 = envelope.content.claims.Value.cbc_DocumentCurrencyCode._listAgencyID.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cbc_DocumentCurrencyCode._listAgencyID) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(envelope.content.claims.Value.cbc_DocumentCurrencyCode.code!= null) { int strlen_6 = envelope.content.claims.Value.cbc_DocumentCurrencyCode.code.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cbc_DocumentCurrencyCode.code) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } if(envelope.content.claims.Value.cbc_AccountingCost!= null) { int strlen_5 = envelope.content.claims.Value.cbc_AccountingCost.Length * 2; *(int*)targetPtr = strlen_5; targetPtr += sizeof(int); fixed(char* pstr_5 = envelope.content.claims.Value.cbc_AccountingCost) { Memory.Copy(pstr_5, targetPtr, strlen_5); targetPtr += strlen_5; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { { *(long*)targetPtr = envelope.content.claims.Value.cbc_InvoicePeriod.cbc_StartDate.ToBinary(); targetPtr += 8; } { *(long*)targetPtr = envelope.content.claims.Value.cbc_InvoicePeriod.cbc_EndDate.ToBinary(); targetPtr += 8; } } { if(envelope.content.claims.Value.cbc_OrderReference.cbc_ID!= null) { int strlen_6 = envelope.content.claims.Value.cbc_OrderReference.cbc_ID.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cbc_OrderReference.cbc_ID) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } { byte* optheader_5 = targetPtr; *(optheader_5 + 0) = 0x00; targetPtr += 1; if(envelope.content.claims.Value.cac_ContractDocumentReference.ID!= null) { int strlen_6 = envelope.content.claims.Value.cac_ContractDocumentReference.ID.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cac_ContractDocumentReference.ID) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(envelope.content.claims.Value.cac_ContractDocumentReference.DocumentType!= null) { int strlen_6 = envelope.content.claims.Value.cac_ContractDocumentReference.DocumentType.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cac_ContractDocumentReference.DocumentType) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_ContractDocumentReference.cac_Attachment!= null) { { if(envelope.content.claims.Value.cac_ContractDocumentReference.cac_Attachment.Value.cac_ExternalReferenceUdid!= null) { int strlen_7 = envelope.content.claims.Value.cac_ContractDocumentReference.cac_Attachment.Value.cac_ExternalReferenceUdid.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_ContractDocumentReference.cac_Attachment.Value.cac_ExternalReferenceUdid) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } }*(optheader_5 + 0) |= 0x01; } } { byte *storedPtr_5 = targetPtr; targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_AdditionalDocumentReferences!= null) { for(int iterator_5 = 0;iterator_5<envelope.content.claims.Value.cac_AdditionalDocumentReferences.Count;++iterator_5) { { byte* optheader_6 = targetPtr; *(optheader_6 + 0) = 0x00; targetPtr += 1; if(envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].ID!= null) { int strlen_7 = envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].ID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].ID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].DocumentType!= null) { int strlen_7 = envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].DocumentType.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].DocumentType) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].cac_Attachment!= null) { { if(envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].cac_Attachment.Value.cac_ExternalReferenceUdid!= null) { int strlen_8 = envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].cac_Attachment.Value.cac_ExternalReferenceUdid.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].cac_Attachment.Value.cac_ExternalReferenceUdid) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } }*(optheader_6 + 0) |= 0x01; } } } } *(int*)storedPtr_5 = (int)(targetPtr - storedPtr_5 - 4); } { if(envelope.content.claims.Value.cac_AccountingSupplierParty.cac_PartyUdid!= null) { int strlen_6 = envelope.content.claims.Value.cac_AccountingSupplierParty.cac_PartyUdid.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cac_AccountingSupplierParty.cac_PartyUdid) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } { if(envelope.content.claims.Value.cac_AccountingCustomerParty.cac_PartyUdid!= null) { int strlen_6 = envelope.content.claims.Value.cac_AccountingCustomerParty.cac_PartyUdid.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cac_AccountingCustomerParty.cac_PartyUdid) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } { if(envelope.content.claims.Value.cac_PayeeParty.cac_PartyUdid!= null) { int strlen_6 = envelope.content.claims.Value.cac_PayeeParty.cac_PartyUdid.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cac_PayeeParty.cac_PartyUdid) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } { { *(long*)targetPtr = envelope.content.claims.Value.cac_Delivery.cbc_ActualDeliveryDate.ToBinary(); targetPtr += 8; } { { byte* optheader_7 = targetPtr; *(optheader_7 + 0) = 0x00; targetPtr += 1; if(envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeID!= null) { int strlen_8 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeID.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeID) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeAgencyID!= null) { if(envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeAgencyID!= null) { int strlen_8 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeAgencyID.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeAgencyID) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_7 + 0) |= 0x01; } if(envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID.code!= null) { int strlen_8 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID.code.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID.code) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } if(envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cac_AddressUdid!= null) { int strlen_7 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cac_AddressUdid.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cac_AddressUdid) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } } if(envelope.content.claims.Value.cac_PaymentMeansUdid!= null) { int strlen_5 = envelope.content.claims.Value.cac_PaymentMeansUdid.Length * 2; *(int*)targetPtr = strlen_5; targetPtr += sizeof(int); fixed(char* pstr_5 = envelope.content.claims.Value.cac_PaymentMeansUdid) { Memory.Copy(pstr_5, targetPtr, strlen_5); targetPtr += strlen_5; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { { *(ISO639_1_LanguageCodes*)targetPtr = envelope.content.claims.Value.cac_PaymentTerms.cbc_Note._languageID; targetPtr += 1; if(envelope.content.claims.Value.cac_PaymentTerms.cbc_Note.note!= null) { int strlen_7 = envelope.content.claims.Value.cac_PaymentTerms.cbc_Note.note.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_PaymentTerms.cbc_Note.note) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } } { byte *storedPtr_5 = targetPtr; targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_AllowanceCharges!= null) { for(int iterator_5 = 0;iterator_5<envelope.content.claims.Value.cac_AllowanceCharges.Count;++iterator_5) { { *(bool*)targetPtr = envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_ChargeIndicator; targetPtr += 1; if(envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_AllowanceChargeReason!= null) { int strlen_7 = envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_AllowanceChargeReason.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_AllowanceChargeReason) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { if(envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_Amount._CurrencyID!= null) { int strlen_8 = envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_Amount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_Amount._CurrencyID) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_Amount.amount; targetPtr += 8; } } } } *(int*)storedPtr_5 = (int)(targetPtr - storedPtr_5 - 4); } { { if(envelope.content.claims.Value.cac_TaxTotal.cbc_TaxAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_TaxTotal.cbc_TaxAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_TaxTotal.cbc_TaxAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_TaxTotal.cbc_TaxAmount.amount; targetPtr += 8; } { byte *storedPtr_6 = targetPtr; targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals!= null) { for(int iterator_6 = 0;iterator_6<envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals.Count;++iterator_6) { { { if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxableAmount._CurrencyID!= null) { int strlen_9 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxableAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_9; targetPtr += sizeof(int); fixed(char* pstr_9 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxableAmount._CurrencyID) { Memory.Copy(pstr_9, targetPtr, strlen_9); targetPtr += strlen_9; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxableAmount.amount; targetPtr += 8; } { if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxAmount._CurrencyID!= null) { int strlen_9 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_9; targetPtr += sizeof(int); fixed(char* pstr_9 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxAmount._CurrencyID) { Memory.Copy(pstr_9, targetPtr, strlen_9); targetPtr += strlen_9; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxAmount.amount; targetPtr += 8; } { { byte* optheader_9 = targetPtr; *(optheader_9 + 0) = 0x00; targetPtr += 1; if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeID!= null) { int strlen_10 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeID.Length * 2; *(int*)targetPtr = strlen_10; targetPtr += sizeof(int); fixed(char* pstr_10 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeID) { Memory.Copy(pstr_10, targetPtr, strlen_10); targetPtr += strlen_10; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeAgencyID!= null) { if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeAgencyID!= null) { int strlen_10 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeAgencyID.Length * 2; *(int*)targetPtr = strlen_10; targetPtr += sizeof(int); fixed(char* pstr_10 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeAgencyID) { Memory.Copy(pstr_10, targetPtr, strlen_10); targetPtr += strlen_10; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_9 + 0) |= 0x01; } if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID.code!= null) { int strlen_10 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID.code.Length * 2; *(int*)targetPtr = strlen_10; targetPtr += sizeof(int); fixed(char* pstr_10 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID.code) { Memory.Copy(pstr_10, targetPtr, strlen_10); targetPtr += strlen_10; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } *(double*)targetPtr = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_Percent; targetPtr += 8; { { byte* optheader_10 = targetPtr; *(optheader_10 + 0) = 0x00; targetPtr += 1; if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID!= null) { int strlen_11 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID.Length * 2; *(int*)targetPtr = strlen_11; targetPtr += sizeof(int); fixed(char* pstr_11 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID) { Memory.Copy(pstr_11, targetPtr, strlen_11); targetPtr += strlen_11; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID!= null) { if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID!= null) { int strlen_11 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID.Length * 2; *(int*)targetPtr = strlen_11; targetPtr += sizeof(int); fixed(char* pstr_11 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID) { Memory.Copy(pstr_11, targetPtr, strlen_11); targetPtr += strlen_11; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_10 + 0) |= 0x01; } if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID.code!= null) { int strlen_11 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID.code.Length * 2; *(int*)targetPtr = strlen_11; targetPtr += sizeof(int); fixed(char* pstr_11 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID.code) { Memory.Copy(pstr_11, targetPtr, strlen_11); targetPtr += strlen_11; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } } } } } } *(int*)storedPtr_6 = (int)(targetPtr - storedPtr_6 - 4); } } { { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_LineExtensionAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_LineExtensionAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_LineExtensionAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_LineExtensionAmount.amount; targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxExclusiveAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxExclusiveAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxExclusiveAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxExclusiveAmount.amount; targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxInclusiveAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxInclusiveAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxInclusiveAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxInclusiveAmount.amount; targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_AllowanceTotalAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_AllowanceTotalAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_AllowanceTotalAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_AllowanceTotalAmount.amount; targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_ChargeTotalAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_ChargeTotalAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_ChargeTotalAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_ChargeTotalAmount.amount; targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PrepaidAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PrepaidAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PrepaidAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PrepaidAmount.amount; targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableRoundingAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableRoundingAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableRoundingAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableRoundingAmount.amount; targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableAmount.amount; targetPtr += 8; } } { byte *storedPtr_5 = targetPtr; targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_InvoiceLine!= null) { for(int iterator_5 = 0;iterator_5<envelope.content.claims.Value.cac_InvoiceLine.Count;++iterator_5) { { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_ID!= null) { int strlen_7 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_ID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_ID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { *(ISO639_1_LanguageCodes*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_Note._languageID; targetPtr += 1; if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_Note.note!= null) { int strlen_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_Note.note.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_Note.note) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_InvoicedQuantity._unitCode!= null) { int strlen_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_InvoicedQuantity._unitCode.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_InvoicedQuantity._unitCode) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(long*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_InvoicedQuantity.quantity; targetPtr += 8; } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_LineExtensionAmount._CurrencyID!= null) { int strlen_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_LineExtensionAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_LineExtensionAmount._CurrencyID) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_LineExtensionAmount.amount; targetPtr += 8; } if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_AccountingCost!= null) { int strlen_7 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_AccountingCost.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_AccountingCost) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_OrderLineReference.cbc_LineID!= null) { int strlen_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_OrderLineReference.cbc_LineID.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_OrderLineReference.cbc_LineID) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } { byte *storedPtr_7 = targetPtr; targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges!= null) { for(int iterator_7 = 0;iterator_7<envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges.Count;++iterator_7) { { *(bool*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_ChargeIndicator; targetPtr += 1; if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_AllowanceChargeReason!= null) { int strlen_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_AllowanceChargeReason.Length * 2; *(int*)targetPtr = strlen_9; targetPtr += sizeof(int); fixed(char* pstr_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_AllowanceChargeReason) { Memory.Copy(pstr_9, targetPtr, strlen_9); targetPtr += strlen_9; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_Amount._CurrencyID!= null) { int strlen_10 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_Amount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_10; targetPtr += sizeof(int); fixed(char* pstr_10 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_Amount._CurrencyID) { Memory.Copy(pstr_10, targetPtr, strlen_10); targetPtr += strlen_10; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_Amount.amount; targetPtr += 8; } } } } *(int*)storedPtr_7 = (int)(targetPtr - storedPtr_7 - 4); } { { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cbc_TaxAmount._CurrencyID!= null) { int strlen_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cbc_TaxAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_9; targetPtr += sizeof(int); fixed(char* pstr_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cbc_TaxAmount._CurrencyID) { Memory.Copy(pstr_9, targetPtr, strlen_9); targetPtr += strlen_9; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cbc_TaxAmount.amount; targetPtr += 8; } { byte *storedPtr_8 = targetPtr; targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals!= null) { for(int iterator_8 = 0;iterator_8<envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals.Count;++iterator_8) { { { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxableAmount._CurrencyID!= null) { int strlen_11 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxableAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_11; targetPtr += sizeof(int); fixed(char* pstr_11 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxableAmount._CurrencyID) { Memory.Copy(pstr_11, targetPtr, strlen_11); targetPtr += strlen_11; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxableAmount.amount; targetPtr += 8; } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxAmount._CurrencyID!= null) { int strlen_11 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_11; targetPtr += sizeof(int); fixed(char* pstr_11 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxAmount._CurrencyID) { Memory.Copy(pstr_11, targetPtr, strlen_11); targetPtr += strlen_11; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxAmount.amount; targetPtr += 8; } { { byte* optheader_11 = targetPtr; *(optheader_11 + 0) = 0x00; targetPtr += 1; if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeID!= null) { int strlen_12 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeID.Length * 2; *(int*)targetPtr = strlen_12; targetPtr += sizeof(int); fixed(char* pstr_12 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeID) { Memory.Copy(pstr_12, targetPtr, strlen_12); targetPtr += strlen_12; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeAgencyID!= null) { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeAgencyID!= null) { int strlen_12 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeAgencyID.Length * 2; *(int*)targetPtr = strlen_12; targetPtr += sizeof(int); fixed(char* pstr_12 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeAgencyID) { Memory.Copy(pstr_12, targetPtr, strlen_12); targetPtr += strlen_12; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_11 + 0) |= 0x01; } if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID.code!= null) { int strlen_12 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID.code.Length * 2; *(int*)targetPtr = strlen_12; targetPtr += sizeof(int); fixed(char* pstr_12 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID.code) { Memory.Copy(pstr_12, targetPtr, strlen_12); targetPtr += strlen_12; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } *(double*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_Percent; targetPtr += 8; { { byte* optheader_12 = targetPtr; *(optheader_12 + 0) = 0x00; targetPtr += 1; if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID!= null) { int strlen_13 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID.Length * 2; *(int*)targetPtr = strlen_13; targetPtr += sizeof(int); fixed(char* pstr_13 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID) { Memory.Copy(pstr_13, targetPtr, strlen_13); targetPtr += strlen_13; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID!= null) { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID!= null) { int strlen_13 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID.Length * 2; *(int*)targetPtr = strlen_13; targetPtr += sizeof(int); fixed(char* pstr_13 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID) { Memory.Copy(pstr_13, targetPtr, strlen_13); targetPtr += strlen_13; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_12 + 0) |= 0x01; } if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID.code!= null) { int strlen_13 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID.code.Length * 2; *(int*)targetPtr = strlen_13; targetPtr += sizeof(int); fixed(char* pstr_13 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID.code) { Memory.Copy(pstr_13, targetPtr, strlen_13); targetPtr += strlen_13; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } } } } } } *(int*)storedPtr_8 = (int)(targetPtr - storedPtr_8 - 4); } } if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_ItemUdid!= null) { int strlen_7 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_ItemUdid.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_ItemUdid) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_PriceAmount._CurrencyID!= null) { int strlen_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_PriceAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_9; targetPtr += sizeof(int); fixed(char* pstr_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_PriceAmount._CurrencyID) { Memory.Copy(pstr_9, targetPtr, strlen_9); targetPtr += strlen_9; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_PriceAmount.amount; targetPtr += 8; } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_BaseQuantity._unitCode!= null) { int strlen_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_BaseQuantity._unitCode.Length * 2; *(int*)targetPtr = strlen_9; targetPtr += sizeof(int); fixed(char* pstr_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_BaseQuantity._unitCode) { Memory.Copy(pstr_9, targetPtr, strlen_9); targetPtr += strlen_9; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(long*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_BaseQuantity.quantity; targetPtr += 8; } { *(bool*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_ChargeIndicator; targetPtr += 1; if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_AllowanceChargeReason!= null) { int strlen_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_AllowanceChargeReason.Length * 2; *(int*)targetPtr = strlen_9; targetPtr += sizeof(int); fixed(char* pstr_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_AllowanceChargeReason) { Memory.Copy(pstr_9, targetPtr, strlen_9); targetPtr += strlen_9; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_Amount._CurrencyID!= null) { int strlen_10 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_Amount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_10; targetPtr += sizeof(int); fixed(char* pstr_10 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_Amount._CurrencyID) { Memory.Copy(pstr_10, targetPtr, strlen_10); targetPtr += strlen_10; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_Amount.amount; targetPtr += 8; } } } } } } *(int*)storedPtr_5 = (int)(targetPtr - storedPtr_5 - 4); } }*(optheader_3 + 0) |= 0x02; } if( envelope.content.encryptedclaims!= null) { { if(envelope.content.encryptedclaims.Value.ciphertext16!= null) { int strlen_5 = envelope.content.encryptedclaims.Value.ciphertext16.Length * 2; *(int*)targetPtr = strlen_5; targetPtr += sizeof(int); fixed(char* pstr_5 = envelope.content.encryptedclaims.Value.ciphertext16) { Memory.Copy(pstr_5, targetPtr, strlen_5); targetPtr += strlen_5; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(envelope.content.encryptedclaims.Value.alg!= null) { int strlen_5 = envelope.content.encryptedclaims.Value.alg.Length * 2; *(int*)targetPtr = strlen_5; targetPtr += sizeof(int); fixed(char* pstr_5 = envelope.content.encryptedclaims.Value.alg) { Memory.Copy(pstr_5, targetPtr, strlen_5); targetPtr += strlen_5; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(envelope.content.encryptedclaims.Value.key!= null) { int strlen_5 = envelope.content.encryptedclaims.Value.key.Length * 2; *(int*)targetPtr = strlen_5; targetPtr += sizeof(int); fixed(char* pstr_5 = envelope.content.encryptedclaims.Value.key) { Memory.Copy(pstr_5, targetPtr, strlen_5); targetPtr += strlen_5; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } }*(optheader_3 + 0) |= 0x04; } } { byte* optheader_3 = targetPtr; *(optheader_3 + 0) = 0x00; targetPtr += 1; *(TRACredentialType*)targetPtr = envelope.label.credtype; targetPtr += 1; *(long*)targetPtr = envelope.label.version; targetPtr += 8; *(TRATrustLevel*)targetPtr = envelope.label.trustLevel; targetPtr += 1; *(TRAEncryptionFlag*)targetPtr = envelope.label.encryptionFlag; targetPtr += 1; if(envelope.label.notaryudid!= null) { int strlen_4 = envelope.label.notaryudid.Length * 2; *(int*)targetPtr = strlen_4; targetPtr += sizeof(int); fixed(char* pstr_4 = envelope.label.notaryudid) { Memory.Copy(pstr_4, targetPtr, strlen_4); targetPtr += strlen_4; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if( envelope.label.name!= null) { if(envelope.label.name!= null) { int strlen_4 = envelope.label.name.Length * 2; *(int*)targetPtr = strlen_4; targetPtr += sizeof(int); fixed(char* pstr_4 = envelope.label.name) { Memory.Copy(pstr_4, targetPtr, strlen_4); targetPtr += strlen_4; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_3 + 0) |= 0x01; } if( envelope.label.comment!= null) { if(envelope.label.comment!= null) { int strlen_4 = envelope.label.comment.Length * 2; *(int*)targetPtr = strlen_4; targetPtr += sizeof(int); fixed(char* pstr_4 = envelope.label.comment) { Memory.Copy(pstr_4, targetPtr, strlen_4); targetPtr += strlen_4; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_3 + 0) |= 0x02; } } } { byte* optheader_2 = targetPtr; *(optheader_2 + 0) = 0x00; targetPtr += 1; if( envelopeseal.hashedThumbprint64!= null) { if(envelopeseal.hashedThumbprint64!= null) { int strlen_3 = envelopeseal.hashedThumbprint64.Length * 2; *(int*)targetPtr = strlen_3; targetPtr += sizeof(int); fixed(char* pstr_3 = envelopeseal.hashedThumbprint64) { Memory.Copy(pstr_3, targetPtr, strlen_3); targetPtr += strlen_3; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_2 + 0) |= 0x01; } if( envelopeseal.signedHashSignature64!= null) { if(envelopeseal.signedHashSignature64!= null) { int strlen_3 = envelopeseal.signedHashSignature64.Length * 2; *(int*)targetPtr = strlen_3; targetPtr += sizeof(int); fixed(char* pstr_3 = envelopeseal.signedHashSignature64) { Memory.Copy(pstr_3, targetPtr, strlen_3); targetPtr += strlen_3; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_2 + 0) |= 0x02; } if( envelopeseal.notaryStamp!= null) { if(envelopeseal.notaryStamp!= null) { int strlen_3 = envelopeseal.notaryStamp.Length * 2; *(int*)targetPtr = strlen_3; targetPtr += sizeof(int); fixed(char* pstr_3 = envelopeseal.notaryStamp) { Memory.Copy(pstr_3, targetPtr, strlen_3); targetPtr += strlen_3; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_2 + 0) |= 0x04; } if( envelopeseal.comments!= null) { { byte *storedPtr_3 = targetPtr; targetPtr += sizeof(int); if(envelopeseal.comments!= null) { for(int iterator_3 = 0;iterator_3<envelopeseal.comments.Count;++iterator_3) { if(envelopeseal.comments[iterator_3]!= null) { int strlen_4 = envelopeseal.comments[iterator_3].Length * 2; *(int*)targetPtr = strlen_4; targetPtr += sizeof(int); fixed(char* pstr_4 = envelopeseal.comments[iterator_3]) { Memory.Copy(pstr_4, targetPtr, strlen_4); targetPtr += strlen_4; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } } *(int*)storedPtr_3 = (int)(targetPtr - storedPtr_3 - 4); } *(optheader_2 + 0) |= 0x08; } } } } s_default_content = tmpcell; return tmpcell; } UBL21_Invoice2_Envelope_Accessor envelope_Accessor_Field; ///<summary> ///Provides in-place access to the object field envelope. ///</summary> public unsafe UBL21_Invoice2_Envelope_Accessor envelope { get { byte* targetPtr = m_ptr; {}envelope_Accessor_Field.m_ptr = targetPtr; envelope_Accessor_Field.m_cellId = this.m_cellId; return envelope_Accessor_Field; } set { if ((object)value == null) throw new ArgumentNullException("The assigned variable is null."); envelope_Accessor_Field.m_cellId = this.m_cellId; byte* targetPtr = m_ptr; {} int offset = (int)(targetPtr - m_ptr); byte* oldtargetPtr = targetPtr; int oldlength = (int)(targetPtr - oldtargetPtr); targetPtr = value.m_ptr; int newlength = (int)(targetPtr - value.m_ptr); if (newlength != oldlength) { if (value.m_cellId != this.m_cellId) { this.m_ptr = this.ResizeFunction(this.m_ptr, offset, newlength - oldlength); Memory.Copy(value.m_ptr, this.m_ptr + offset, newlength); } else { byte[] tmpcell = new byte[newlength]; fixed(byte* tmpcellptr = tmpcell) { Memory.Copy(value.m_ptr, tmpcellptr, newlength); this.m_ptr = this.ResizeFunction(this.m_ptr, offset, newlength - oldlength); Memory.Copy(tmpcellptr, this.m_ptr + offset, newlength); } } } else { Memory.Copy(value.m_ptr, oldtargetPtr, oldlength); } } } TRACredential_EnvelopeSeal_Accessor envelopeseal_Accessor_Field; ///<summary> ///Provides in-place access to the object field envelopeseal. ///</summary> public unsafe TRACredential_EnvelopeSeal_Accessor envelopeseal { get { byte* targetPtr = m_ptr; {{{ byte* optheader_5 = targetPtr; targetPtr += 1; targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int); if ((0 != (*(optheader_5 + 0) & 0x01))) { targetPtr += *(int*)targetPtr + sizeof(int); } if ((0 != (*(optheader_5 + 0) & 0x02))) { {targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; {targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int);}{ targetPtr += 1; targetPtr += *(int*)targetPtr + sizeof(int);} targetPtr += 8; {targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int);}targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 16; {targetPtr += *(int*)targetPtr + sizeof(int);}{ byte* optheader_9 = targetPtr; targetPtr += 1; targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int); if ((0 != (*(optheader_9 + 0) & 0x01))) { {targetPtr += *(int*)targetPtr + sizeof(int);} } }targetPtr += *(int*)targetPtr + sizeof(int);{targetPtr += *(int*)targetPtr + sizeof(int);}{targetPtr += *(int*)targetPtr + sizeof(int);}{targetPtr += *(int*)targetPtr + sizeof(int);}{ targetPtr += 8; {{ byte* optheader_13 = targetPtr; targetPtr += 1; targetPtr += *(int*)targetPtr + sizeof(int); if ((0 != (*(optheader_13 + 0) & 0x01))) { targetPtr += *(int*)targetPtr + sizeof(int); } targetPtr += *(int*)targetPtr + sizeof(int);}targetPtr += *(int*)targetPtr + sizeof(int);}}targetPtr += *(int*)targetPtr + sizeof(int);{{ targetPtr += 1; targetPtr += *(int*)targetPtr + sizeof(int);}}targetPtr += *(int*)targetPtr + sizeof(int);{{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }targetPtr += *(int*)targetPtr + sizeof(int);}{{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }}targetPtr += *(int*)targetPtr + sizeof(int);} } if ((0 != (*(optheader_5 + 0) & 0x04))) { {targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int);} } }{ byte* optheader_5 = targetPtr; targetPtr += 1; targetPtr += 11; targetPtr += *(int*)targetPtr + sizeof(int); if ((0 != (*(optheader_5 + 0) & 0x01))) { targetPtr += *(int*)targetPtr + sizeof(int); } if ((0 != (*(optheader_5 + 0) & 0x02))) { targetPtr += *(int*)targetPtr + sizeof(int); } }}}envelopeseal_Accessor_Field.m_ptr = targetPtr; envelopeseal_Accessor_Field.m_cellId = this.m_cellId; return envelopeseal_Accessor_Field; } set { if ((object)value == null) throw new ArgumentNullException("The assigned variable is null."); envelopeseal_Accessor_Field.m_cellId = this.m_cellId; byte* targetPtr = m_ptr; {{{ byte* optheader_5 = targetPtr; targetPtr += 1; targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int); if ((0 != (*(optheader_5 + 0) & 0x01))) { targetPtr += *(int*)targetPtr + sizeof(int); } if ((0 != (*(optheader_5 + 0) & 0x02))) { {targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; {targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int);}{ targetPtr += 1; targetPtr += *(int*)targetPtr + sizeof(int);} targetPtr += 8; {targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int);}targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 16; {targetPtr += *(int*)targetPtr + sizeof(int);}{ byte* optheader_9 = targetPtr; targetPtr += 1; targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int); if ((0 != (*(optheader_9 + 0) & 0x01))) { {targetPtr += *(int*)targetPtr + sizeof(int);} } }targetPtr += *(int*)targetPtr + sizeof(int);{targetPtr += *(int*)targetPtr + sizeof(int);}{targetPtr += *(int*)targetPtr + sizeof(int);}{targetPtr += *(int*)targetPtr + sizeof(int);}{ targetPtr += 8; {{ byte* optheader_13 = targetPtr; targetPtr += 1; targetPtr += *(int*)targetPtr + sizeof(int); if ((0 != (*(optheader_13 + 0) & 0x01))) { targetPtr += *(int*)targetPtr + sizeof(int); } targetPtr += *(int*)targetPtr + sizeof(int);}targetPtr += *(int*)targetPtr + sizeof(int);}}targetPtr += *(int*)targetPtr + sizeof(int);{{ targetPtr += 1; targetPtr += *(int*)targetPtr + sizeof(int);}}targetPtr += *(int*)targetPtr + sizeof(int);{{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }targetPtr += *(int*)targetPtr + sizeof(int);}{{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }}targetPtr += *(int*)targetPtr + sizeof(int);} } if ((0 != (*(optheader_5 + 0) & 0x04))) { {targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int);} } }{ byte* optheader_5 = targetPtr; targetPtr += 1; targetPtr += 11; targetPtr += *(int*)targetPtr + sizeof(int); if ((0 != (*(optheader_5 + 0) & 0x01))) { targetPtr += *(int*)targetPtr + sizeof(int); } if ((0 != (*(optheader_5 + 0) & 0x02))) { targetPtr += *(int*)targetPtr + sizeof(int); } }}} int offset = (int)(targetPtr - m_ptr); byte* oldtargetPtr = targetPtr; int oldlength = (int)(targetPtr - oldtargetPtr); targetPtr = value.m_ptr; int newlength = (int)(targetPtr - value.m_ptr); if (newlength != oldlength) { if (value.m_cellId != this.m_cellId) { this.m_ptr = this.ResizeFunction(this.m_ptr, offset, newlength - oldlength); Memory.Copy(value.m_ptr, this.m_ptr + offset, newlength); } else { byte[] tmpcell = new byte[newlength]; fixed(byte* tmpcellptr = tmpcell) { Memory.Copy(value.m_ptr, tmpcellptr, newlength); this.m_ptr = this.ResizeFunction(this.m_ptr, offset, newlength - oldlength); Memory.Copy(tmpcellptr, this.m_ptr + offset, newlength); } } } else { Memory.Copy(value.m_ptr, oldtargetPtr, oldlength); } } } public static unsafe implicit operator UBL21_Invoice2_Cell(UBL21_Invoice2_Cell_Accessor accessor) { return new UBL21_Invoice2_Cell(accessor.CellId , accessor.envelope , accessor.envelopeseal ); } public unsafe static implicit operator UBL21_Invoice2_Cell_Accessor(UBL21_Invoice2_Cell field) { byte* targetPtr = null; { { { targetPtr += 1; if(field.envelope.content.udid!= null) { int strlen_4 = field.envelope.content.udid.Length * 2; targetPtr += strlen_4+sizeof(int); }else { targetPtr += sizeof(int); } { targetPtr += sizeof(int); if(field.envelope.content.context!= null) { for(int iterator_4 = 0;iterator_4<field.envelope.content.context.Count;++iterator_4) { if(field.envelope.content.context[iterator_4]!= null) { int strlen_5 = field.envelope.content.context[iterator_4].Length * 2; targetPtr += strlen_5+sizeof(int); }else { targetPtr += sizeof(int); } } } } if( field.envelope.content.credentialsubjectudid!= null) { if(field.envelope.content.credentialsubjectudid!= null) { int strlen_4 = field.envelope.content.credentialsubjectudid.Length * 2; targetPtr += strlen_4+sizeof(int); }else { targetPtr += sizeof(int); } } if( field.envelope.content.claims!= null) { { if(field.envelope.content.claims.Value.cbc_UBLVersionID!= null) { int strlen_5 = field.envelope.content.claims.Value.cbc_UBLVersionID.Length * 2; targetPtr += strlen_5+sizeof(int); }else { targetPtr += sizeof(int); } if(field.envelope.content.claims.Value.cbc_ID!= null) { int strlen_5 = field.envelope.content.claims.Value.cbc_ID.Length * 2; targetPtr += strlen_5+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; { if(field.envelope.content.claims.Value.cbc_InvoiceTypeCode._listID!= null) { int strlen_6 = field.envelope.content.claims.Value.cbc_InvoiceTypeCode._listID.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } if(field.envelope.content.claims.Value.cbc_InvoiceTypeCode._listAgencyID!= null) { int strlen_6 = field.envelope.content.claims.Value.cbc_InvoiceTypeCode._listAgencyID.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } if(field.envelope.content.claims.Value.cbc_InvoiceTypeCode.code!= null) { int strlen_6 = field.envelope.content.claims.Value.cbc_InvoiceTypeCode.code.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } } { targetPtr += 1; if(field.envelope.content.claims.Value.cbc_Note.note!= null) { int strlen_6 = field.envelope.content.claims.Value.cbc_Note.note.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } }targetPtr += 8; { if(field.envelope.content.claims.Value.cbc_DocumentCurrencyCode._listID!= null) { int strlen_6 = field.envelope.content.claims.Value.cbc_DocumentCurrencyCode._listID.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } if(field.envelope.content.claims.Value.cbc_DocumentCurrencyCode._listAgencyID!= null) { int strlen_6 = field.envelope.content.claims.Value.cbc_DocumentCurrencyCode._listAgencyID.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } if(field.envelope.content.claims.Value.cbc_DocumentCurrencyCode.code!= null) { int strlen_6 = field.envelope.content.claims.Value.cbc_DocumentCurrencyCode.code.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } } if(field.envelope.content.claims.Value.cbc_AccountingCost!= null) { int strlen_5 = field.envelope.content.claims.Value.cbc_AccountingCost.Length * 2; targetPtr += strlen_5+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 16; { if(field.envelope.content.claims.Value.cbc_OrderReference.cbc_ID!= null) { int strlen_6 = field.envelope.content.claims.Value.cbc_OrderReference.cbc_ID.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } } { targetPtr += 1; if(field.envelope.content.claims.Value.cac_ContractDocumentReference.ID!= null) { int strlen_6 = field.envelope.content.claims.Value.cac_ContractDocumentReference.ID.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } if(field.envelope.content.claims.Value.cac_ContractDocumentReference.DocumentType!= null) { int strlen_6 = field.envelope.content.claims.Value.cac_ContractDocumentReference.DocumentType.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } if( field.envelope.content.claims.Value.cac_ContractDocumentReference.cac_Attachment!= null) { { if(field.envelope.content.claims.Value.cac_ContractDocumentReference.cac_Attachment.Value.cac_ExternalReferenceUdid!= null) { int strlen_7 = field.envelope.content.claims.Value.cac_ContractDocumentReference.cac_Attachment.Value.cac_ExternalReferenceUdid.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } } } } { targetPtr += sizeof(int); if(field.envelope.content.claims.Value.cac_AdditionalDocumentReferences!= null) { for(int iterator_5 = 0;iterator_5<field.envelope.content.claims.Value.cac_AdditionalDocumentReferences.Count;++iterator_5) { { targetPtr += 1; if(field.envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].ID!= null) { int strlen_7 = field.envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].ID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } if(field.envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].DocumentType!= null) { int strlen_7 = field.envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].DocumentType.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } if( field.envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].cac_Attachment!= null) { { if(field.envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].cac_Attachment.Value.cac_ExternalReferenceUdid!= null) { int strlen_8 = field.envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].cac_Attachment.Value.cac_ExternalReferenceUdid.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } } } } } } } { if(field.envelope.content.claims.Value.cac_AccountingSupplierParty.cac_PartyUdid!= null) { int strlen_6 = field.envelope.content.claims.Value.cac_AccountingSupplierParty.cac_PartyUdid.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } } { if(field.envelope.content.claims.Value.cac_AccountingCustomerParty.cac_PartyUdid!= null) { int strlen_6 = field.envelope.content.claims.Value.cac_AccountingCustomerParty.cac_PartyUdid.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } } { if(field.envelope.content.claims.Value.cac_PayeeParty.cac_PartyUdid!= null) { int strlen_6 = field.envelope.content.claims.Value.cac_PayeeParty.cac_PartyUdid.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } } { targetPtr += 8; { { targetPtr += 1; if(field.envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeID!= null) { int strlen_8 = field.envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeID.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } if( field.envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeAgencyID!= null) { if(field.envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeAgencyID!= null) { int strlen_8 = field.envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeAgencyID.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } } if(field.envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID.code!= null) { int strlen_8 = field.envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID.code.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } } if(field.envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cac_AddressUdid!= null) { int strlen_7 = field.envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cac_AddressUdid.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } } } if(field.envelope.content.claims.Value.cac_PaymentMeansUdid!= null) { int strlen_5 = field.envelope.content.claims.Value.cac_PaymentMeansUdid.Length * 2; targetPtr += strlen_5+sizeof(int); }else { targetPtr += sizeof(int); } { { targetPtr += 1; if(field.envelope.content.claims.Value.cac_PaymentTerms.cbc_Note.note!= null) { int strlen_7 = field.envelope.content.claims.Value.cac_PaymentTerms.cbc_Note.note.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } } } { targetPtr += sizeof(int); if(field.envelope.content.claims.Value.cac_AllowanceCharges!= null) { for(int iterator_5 = 0;iterator_5<field.envelope.content.claims.Value.cac_AllowanceCharges.Count;++iterator_5) { { targetPtr += 1; if(field.envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_AllowanceChargeReason!= null) { int strlen_7 = field.envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_AllowanceChargeReason.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } { if(field.envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_Amount._CurrencyID!= null) { int strlen_8 = field.envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_Amount._CurrencyID.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } } } } } { { if(field.envelope.content.claims.Value.cac_TaxTotal.cbc_TaxAmount._CurrencyID!= null) { int strlen_7 = field.envelope.content.claims.Value.cac_TaxTotal.cbc_TaxAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { targetPtr += sizeof(int); if(field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals!= null) { for(int iterator_6 = 0;iterator_6<field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals.Count;++iterator_6) { { { if(field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxableAmount._CurrencyID!= null) { int strlen_9 = field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxableAmount._CurrencyID.Length * 2; targetPtr += strlen_9+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxAmount._CurrencyID!= null) { int strlen_9 = field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxAmount._CurrencyID.Length * 2; targetPtr += strlen_9+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { { targetPtr += 1; if(field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeID!= null) { int strlen_10 = field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeID.Length * 2; targetPtr += strlen_10+sizeof(int); }else { targetPtr += sizeof(int); } if( field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeAgencyID!= null) { if(field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeAgencyID!= null) { int strlen_10 = field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeAgencyID.Length * 2; targetPtr += strlen_10+sizeof(int); }else { targetPtr += sizeof(int); } } if(field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID.code!= null) { int strlen_10 = field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID.code.Length * 2; targetPtr += strlen_10+sizeof(int); }else { targetPtr += sizeof(int); } } targetPtr += 8; { { targetPtr += 1; if(field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID!= null) { int strlen_11 = field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID.Length * 2; targetPtr += strlen_11+sizeof(int); }else { targetPtr += sizeof(int); } if( field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID!= null) { if(field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID!= null) { int strlen_11 = field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID.Length * 2; targetPtr += strlen_11+sizeof(int); }else { targetPtr += sizeof(int); } } if(field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID.code!= null) { int strlen_11 = field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID.code.Length * 2; targetPtr += strlen_11+sizeof(int); }else { targetPtr += sizeof(int); } } } } } } } } } { { if(field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_LineExtensionAmount._CurrencyID!= null) { int strlen_7 = field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_LineExtensionAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxExclusiveAmount._CurrencyID!= null) { int strlen_7 = field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxExclusiveAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxInclusiveAmount._CurrencyID!= null) { int strlen_7 = field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxInclusiveAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_AllowanceTotalAmount._CurrencyID!= null) { int strlen_7 = field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_AllowanceTotalAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_ChargeTotalAmount._CurrencyID!= null) { int strlen_7 = field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_ChargeTotalAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PrepaidAmount._CurrencyID!= null) { int strlen_7 = field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PrepaidAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableRoundingAmount._CurrencyID!= null) { int strlen_7 = field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableRoundingAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableAmount._CurrencyID!= null) { int strlen_7 = field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } } { targetPtr += sizeof(int); if(field.envelope.content.claims.Value.cac_InvoiceLine!= null) { for(int iterator_5 = 0;iterator_5<field.envelope.content.claims.Value.cac_InvoiceLine.Count;++iterator_5) { { if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_ID!= null) { int strlen_7 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_ID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } { targetPtr += 1; if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_Note.note!= null) { int strlen_8 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_Note.note.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } } { if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_InvoicedQuantity._unitCode!= null) { int strlen_8 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_InvoicedQuantity._unitCode.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_LineExtensionAmount._CurrencyID!= null) { int strlen_8 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_LineExtensionAmount._CurrencyID.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_AccountingCost!= null) { int strlen_7 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_AccountingCost.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } { if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_OrderLineReference.cbc_LineID!= null) { int strlen_8 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_OrderLineReference.cbc_LineID.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } } { targetPtr += sizeof(int); if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges!= null) { for(int iterator_7 = 0;iterator_7<field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges.Count;++iterator_7) { { targetPtr += 1; if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_AllowanceChargeReason!= null) { int strlen_9 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_AllowanceChargeReason.Length * 2; targetPtr += strlen_9+sizeof(int); }else { targetPtr += sizeof(int); } { if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_Amount._CurrencyID!= null) { int strlen_10 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_Amount._CurrencyID.Length * 2; targetPtr += strlen_10+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } } } } } { { if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cbc_TaxAmount._CurrencyID!= null) { int strlen_9 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cbc_TaxAmount._CurrencyID.Length * 2; targetPtr += strlen_9+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { targetPtr += sizeof(int); if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals!= null) { for(int iterator_8 = 0;iterator_8<field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals.Count;++iterator_8) { { { if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxableAmount._CurrencyID!= null) { int strlen_11 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxableAmount._CurrencyID.Length * 2; targetPtr += strlen_11+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxAmount._CurrencyID!= null) { int strlen_11 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxAmount._CurrencyID.Length * 2; targetPtr += strlen_11+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { { targetPtr += 1; if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeID!= null) { int strlen_12 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeID.Length * 2; targetPtr += strlen_12+sizeof(int); }else { targetPtr += sizeof(int); } if( field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeAgencyID!= null) { if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeAgencyID!= null) { int strlen_12 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeAgencyID.Length * 2; targetPtr += strlen_12+sizeof(int); }else { targetPtr += sizeof(int); } } if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID.code!= null) { int strlen_12 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID.code.Length * 2; targetPtr += strlen_12+sizeof(int); }else { targetPtr += sizeof(int); } } targetPtr += 8; { { targetPtr += 1; if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID!= null) { int strlen_13 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID.Length * 2; targetPtr += strlen_13+sizeof(int); }else { targetPtr += sizeof(int); } if( field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID!= null) { if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID!= null) { int strlen_13 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID.Length * 2; targetPtr += strlen_13+sizeof(int); }else { targetPtr += sizeof(int); } } if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID.code!= null) { int strlen_13 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID.code.Length * 2; targetPtr += strlen_13+sizeof(int); }else { targetPtr += sizeof(int); } } } } } } } } } if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_ItemUdid!= null) { int strlen_7 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_ItemUdid.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } { { if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_PriceAmount._CurrencyID!= null) { int strlen_9 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_PriceAmount._CurrencyID.Length * 2; targetPtr += strlen_9+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_BaseQuantity._unitCode!= null) { int strlen_9 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_BaseQuantity._unitCode.Length * 2; targetPtr += strlen_9+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { targetPtr += 1; if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_AllowanceChargeReason!= null) { int strlen_9 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_AllowanceChargeReason.Length * 2; targetPtr += strlen_9+sizeof(int); }else { targetPtr += sizeof(int); } { if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_Amount._CurrencyID!= null) { int strlen_10 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_Amount._CurrencyID.Length * 2; targetPtr += strlen_10+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } } } } } } } } } if( field.envelope.content.encryptedclaims!= null) { { if(field.envelope.content.encryptedclaims.Value.ciphertext16!= null) { int strlen_5 = field.envelope.content.encryptedclaims.Value.ciphertext16.Length * 2; targetPtr += strlen_5+sizeof(int); }else { targetPtr += sizeof(int); } if(field.envelope.content.encryptedclaims.Value.alg!= null) { int strlen_5 = field.envelope.content.encryptedclaims.Value.alg.Length * 2; targetPtr += strlen_5+sizeof(int); }else { targetPtr += sizeof(int); } if(field.envelope.content.encryptedclaims.Value.key!= null) { int strlen_5 = field.envelope.content.encryptedclaims.Value.key.Length * 2; targetPtr += strlen_5+sizeof(int); }else { targetPtr += sizeof(int); } } } } { targetPtr += 1; targetPtr += 1; targetPtr += 8; targetPtr += 1; targetPtr += 1; if(field.envelope.label.notaryudid!= null) { int strlen_4 = field.envelope.label.notaryudid.Length * 2; targetPtr += strlen_4+sizeof(int); }else { targetPtr += sizeof(int); } if( field.envelope.label.name!= null) { if(field.envelope.label.name!= null) { int strlen_4 = field.envelope.label.name.Length * 2; targetPtr += strlen_4+sizeof(int); }else { targetPtr += sizeof(int); } } if( field.envelope.label.comment!= null) { if(field.envelope.label.comment!= null) { int strlen_4 = field.envelope.label.comment.Length * 2; targetPtr += strlen_4+sizeof(int); }else { targetPtr += sizeof(int); } } } } { targetPtr += 1; if( field.envelopeseal.hashedThumbprint64!= null) { if(field.envelopeseal.hashedThumbprint64!= null) { int strlen_3 = field.envelopeseal.hashedThumbprint64.Length * 2; targetPtr += strlen_3+sizeof(int); }else { targetPtr += sizeof(int); } } if( field.envelopeseal.signedHashSignature64!= null) { if(field.envelopeseal.signedHashSignature64!= null) { int strlen_3 = field.envelopeseal.signedHashSignature64.Length * 2; targetPtr += strlen_3+sizeof(int); }else { targetPtr += sizeof(int); } } if( field.envelopeseal.notaryStamp!= null) { if(field.envelopeseal.notaryStamp!= null) { int strlen_3 = field.envelopeseal.notaryStamp.Length * 2; targetPtr += strlen_3+sizeof(int); }else { targetPtr += sizeof(int); } } if( field.envelopeseal.comments!= null) { { targetPtr += sizeof(int); if(field.envelopeseal.comments!= null) { for(int iterator_3 = 0;iterator_3<field.envelopeseal.comments.Count;++iterator_3) { if(field.envelopeseal.comments[iterator_3]!= null) { int strlen_4 = field.envelopeseal.comments[iterator_3].Length * 2; targetPtr += strlen_4+sizeof(int); }else { targetPtr += sizeof(int); } } } } } } } byte* tmpcellptr = BufferAllocator.AllocBuffer((int)targetPtr); Memory.memset(tmpcellptr, 0, (ulong)targetPtr); targetPtr = tmpcellptr; { { { byte* optheader_3 = targetPtr; *(optheader_3 + 0) = 0x00; targetPtr += 1; if(field.envelope.content.udid!= null) { int strlen_4 = field.envelope.content.udid.Length * 2; *(int*)targetPtr = strlen_4; targetPtr += sizeof(int); fixed(char* pstr_4 = field.envelope.content.udid) { Memory.Copy(pstr_4, targetPtr, strlen_4); targetPtr += strlen_4; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { byte *storedPtr_4 = targetPtr; targetPtr += sizeof(int); if(field.envelope.content.context!= null) { for(int iterator_4 = 0;iterator_4<field.envelope.content.context.Count;++iterator_4) { if(field.envelope.content.context[iterator_4]!= null) { int strlen_5 = field.envelope.content.context[iterator_4].Length * 2; *(int*)targetPtr = strlen_5; targetPtr += sizeof(int); fixed(char* pstr_5 = field.envelope.content.context[iterator_4]) { Memory.Copy(pstr_5, targetPtr, strlen_5); targetPtr += strlen_5; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } } *(int*)storedPtr_4 = (int)(targetPtr - storedPtr_4 - 4); } if( field.envelope.content.credentialsubjectudid!= null) { if(field.envelope.content.credentialsubjectudid!= null) { int strlen_4 = field.envelope.content.credentialsubjectudid.Length * 2; *(int*)targetPtr = strlen_4; targetPtr += sizeof(int); fixed(char* pstr_4 = field.envelope.content.credentialsubjectudid) { Memory.Copy(pstr_4, targetPtr, strlen_4); targetPtr += strlen_4; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_3 + 0) |= 0x01; } if( field.envelope.content.claims!= null) { { if(field.envelope.content.claims.Value.cbc_UBLVersionID!= null) { int strlen_5 = field.envelope.content.claims.Value.cbc_UBLVersionID.Length * 2; *(int*)targetPtr = strlen_5; targetPtr += sizeof(int); fixed(char* pstr_5 = field.envelope.content.claims.Value.cbc_UBLVersionID) { Memory.Copy(pstr_5, targetPtr, strlen_5); targetPtr += strlen_5; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(field.envelope.content.claims.Value.cbc_ID!= null) { int strlen_5 = field.envelope.content.claims.Value.cbc_ID.Length * 2; *(int*)targetPtr = strlen_5; targetPtr += sizeof(int); fixed(char* pstr_5 = field.envelope.content.claims.Value.cbc_ID) { Memory.Copy(pstr_5, targetPtr, strlen_5); targetPtr += strlen_5; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { *(long*)targetPtr = field.envelope.content.claims.Value.cbc_IssueDate.ToBinary(); targetPtr += 8; } { if(field.envelope.content.claims.Value.cbc_InvoiceTypeCode._listID!= null) { int strlen_6 = field.envelope.content.claims.Value.cbc_InvoiceTypeCode._listID.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = field.envelope.content.claims.Value.cbc_InvoiceTypeCode._listID) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(field.envelope.content.claims.Value.cbc_InvoiceTypeCode._listAgencyID!= null) { int strlen_6 = field.envelope.content.claims.Value.cbc_InvoiceTypeCode._listAgencyID.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = field.envelope.content.claims.Value.cbc_InvoiceTypeCode._listAgencyID) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(field.envelope.content.claims.Value.cbc_InvoiceTypeCode.code!= null) { int strlen_6 = field.envelope.content.claims.Value.cbc_InvoiceTypeCode.code.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = field.envelope.content.claims.Value.cbc_InvoiceTypeCode.code) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } { *(ISO639_1_LanguageCodes*)targetPtr = field.envelope.content.claims.Value.cbc_Note._languageID; targetPtr += 1; if(field.envelope.content.claims.Value.cbc_Note.note!= null) { int strlen_6 = field.envelope.content.claims.Value.cbc_Note.note.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = field.envelope.content.claims.Value.cbc_Note.note) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } { *(long*)targetPtr = field.envelope.content.claims.Value.cbc_TaxPointDate.ToBinary(); targetPtr += 8; } { if(field.envelope.content.claims.Value.cbc_DocumentCurrencyCode._listID!= null) { int strlen_6 = field.envelope.content.claims.Value.cbc_DocumentCurrencyCode._listID.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = field.envelope.content.claims.Value.cbc_DocumentCurrencyCode._listID) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(field.envelope.content.claims.Value.cbc_DocumentCurrencyCode._listAgencyID!= null) { int strlen_6 = field.envelope.content.claims.Value.cbc_DocumentCurrencyCode._listAgencyID.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = field.envelope.content.claims.Value.cbc_DocumentCurrencyCode._listAgencyID) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(field.envelope.content.claims.Value.cbc_DocumentCurrencyCode.code!= null) { int strlen_6 = field.envelope.content.claims.Value.cbc_DocumentCurrencyCode.code.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = field.envelope.content.claims.Value.cbc_DocumentCurrencyCode.code) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } if(field.envelope.content.claims.Value.cbc_AccountingCost!= null) { int strlen_5 = field.envelope.content.claims.Value.cbc_AccountingCost.Length * 2; *(int*)targetPtr = strlen_5; targetPtr += sizeof(int); fixed(char* pstr_5 = field.envelope.content.claims.Value.cbc_AccountingCost) { Memory.Copy(pstr_5, targetPtr, strlen_5); targetPtr += strlen_5; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { { *(long*)targetPtr = field.envelope.content.claims.Value.cbc_InvoicePeriod.cbc_StartDate.ToBinary(); targetPtr += 8; } { *(long*)targetPtr = field.envelope.content.claims.Value.cbc_InvoicePeriod.cbc_EndDate.ToBinary(); targetPtr += 8; } } { if(field.envelope.content.claims.Value.cbc_OrderReference.cbc_ID!= null) { int strlen_6 = field.envelope.content.claims.Value.cbc_OrderReference.cbc_ID.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = field.envelope.content.claims.Value.cbc_OrderReference.cbc_ID) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } { byte* optheader_5 = targetPtr; *(optheader_5 + 0) = 0x00; targetPtr += 1; if(field.envelope.content.claims.Value.cac_ContractDocumentReference.ID!= null) { int strlen_6 = field.envelope.content.claims.Value.cac_ContractDocumentReference.ID.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = field.envelope.content.claims.Value.cac_ContractDocumentReference.ID) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(field.envelope.content.claims.Value.cac_ContractDocumentReference.DocumentType!= null) { int strlen_6 = field.envelope.content.claims.Value.cac_ContractDocumentReference.DocumentType.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = field.envelope.content.claims.Value.cac_ContractDocumentReference.DocumentType) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if( field.envelope.content.claims.Value.cac_ContractDocumentReference.cac_Attachment!= null) { { if(field.envelope.content.claims.Value.cac_ContractDocumentReference.cac_Attachment.Value.cac_ExternalReferenceUdid!= null) { int strlen_7 = field.envelope.content.claims.Value.cac_ContractDocumentReference.cac_Attachment.Value.cac_ExternalReferenceUdid.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = field.envelope.content.claims.Value.cac_ContractDocumentReference.cac_Attachment.Value.cac_ExternalReferenceUdid) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } }*(optheader_5 + 0) |= 0x01; } } { byte *storedPtr_5 = targetPtr; targetPtr += sizeof(int); if(field.envelope.content.claims.Value.cac_AdditionalDocumentReferences!= null) { for(int iterator_5 = 0;iterator_5<field.envelope.content.claims.Value.cac_AdditionalDocumentReferences.Count;++iterator_5) { { byte* optheader_6 = targetPtr; *(optheader_6 + 0) = 0x00; targetPtr += 1; if(field.envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].ID!= null) { int strlen_7 = field.envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].ID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = field.envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].ID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(field.envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].DocumentType!= null) { int strlen_7 = field.envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].DocumentType.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = field.envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].DocumentType) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if( field.envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].cac_Attachment!= null) { { if(field.envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].cac_Attachment.Value.cac_ExternalReferenceUdid!= null) { int strlen_8 = field.envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].cac_Attachment.Value.cac_ExternalReferenceUdid.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = field.envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].cac_Attachment.Value.cac_ExternalReferenceUdid) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } }*(optheader_6 + 0) |= 0x01; } } } } *(int*)storedPtr_5 = (int)(targetPtr - storedPtr_5 - 4); } { if(field.envelope.content.claims.Value.cac_AccountingSupplierParty.cac_PartyUdid!= null) { int strlen_6 = field.envelope.content.claims.Value.cac_AccountingSupplierParty.cac_PartyUdid.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = field.envelope.content.claims.Value.cac_AccountingSupplierParty.cac_PartyUdid) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } { if(field.envelope.content.claims.Value.cac_AccountingCustomerParty.cac_PartyUdid!= null) { int strlen_6 = field.envelope.content.claims.Value.cac_AccountingCustomerParty.cac_PartyUdid.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = field.envelope.content.claims.Value.cac_AccountingCustomerParty.cac_PartyUdid) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } { if(field.envelope.content.claims.Value.cac_PayeeParty.cac_PartyUdid!= null) { int strlen_6 = field.envelope.content.claims.Value.cac_PayeeParty.cac_PartyUdid.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = field.envelope.content.claims.Value.cac_PayeeParty.cac_PartyUdid) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } { { *(long*)targetPtr = field.envelope.content.claims.Value.cac_Delivery.cbc_ActualDeliveryDate.ToBinary(); targetPtr += 8; } { { byte* optheader_7 = targetPtr; *(optheader_7 + 0) = 0x00; targetPtr += 1; if(field.envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeID!= null) { int strlen_8 = field.envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeID.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = field.envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeID) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if( field.envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeAgencyID!= null) { if(field.envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeAgencyID!= null) { int strlen_8 = field.envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeAgencyID.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = field.envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeAgencyID) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_7 + 0) |= 0x01; } if(field.envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID.code!= null) { int strlen_8 = field.envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID.code.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = field.envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID.code) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } if(field.envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cac_AddressUdid!= null) { int strlen_7 = field.envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cac_AddressUdid.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = field.envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cac_AddressUdid) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } } if(field.envelope.content.claims.Value.cac_PaymentMeansUdid!= null) { int strlen_5 = field.envelope.content.claims.Value.cac_PaymentMeansUdid.Length * 2; *(int*)targetPtr = strlen_5; targetPtr += sizeof(int); fixed(char* pstr_5 = field.envelope.content.claims.Value.cac_PaymentMeansUdid) { Memory.Copy(pstr_5, targetPtr, strlen_5); targetPtr += strlen_5; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { { *(ISO639_1_LanguageCodes*)targetPtr = field.envelope.content.claims.Value.cac_PaymentTerms.cbc_Note._languageID; targetPtr += 1; if(field.envelope.content.claims.Value.cac_PaymentTerms.cbc_Note.note!= null) { int strlen_7 = field.envelope.content.claims.Value.cac_PaymentTerms.cbc_Note.note.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = field.envelope.content.claims.Value.cac_PaymentTerms.cbc_Note.note) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } } { byte *storedPtr_5 = targetPtr; targetPtr += sizeof(int); if(field.envelope.content.claims.Value.cac_AllowanceCharges!= null) { for(int iterator_5 = 0;iterator_5<field.envelope.content.claims.Value.cac_AllowanceCharges.Count;++iterator_5) { { *(bool*)targetPtr = field.envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_ChargeIndicator; targetPtr += 1; if(field.envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_AllowanceChargeReason!= null) { int strlen_7 = field.envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_AllowanceChargeReason.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = field.envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_AllowanceChargeReason) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { if(field.envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_Amount._CurrencyID!= null) { int strlen_8 = field.envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_Amount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = field.envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_Amount._CurrencyID) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = field.envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_Amount.amount; targetPtr += 8; } } } } *(int*)storedPtr_5 = (int)(targetPtr - storedPtr_5 - 4); } { { if(field.envelope.content.claims.Value.cac_TaxTotal.cbc_TaxAmount._CurrencyID!= null) { int strlen_7 = field.envelope.content.claims.Value.cac_TaxTotal.cbc_TaxAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = field.envelope.content.claims.Value.cac_TaxTotal.cbc_TaxAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = field.envelope.content.claims.Value.cac_TaxTotal.cbc_TaxAmount.amount; targetPtr += 8; } { byte *storedPtr_6 = targetPtr; targetPtr += sizeof(int); if(field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals!= null) { for(int iterator_6 = 0;iterator_6<field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals.Count;++iterator_6) { { { if(field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxableAmount._CurrencyID!= null) { int strlen_9 = field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxableAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_9; targetPtr += sizeof(int); fixed(char* pstr_9 = field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxableAmount._CurrencyID) { Memory.Copy(pstr_9, targetPtr, strlen_9); targetPtr += strlen_9; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxableAmount.amount; targetPtr += 8; } { if(field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxAmount._CurrencyID!= null) { int strlen_9 = field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_9; targetPtr += sizeof(int); fixed(char* pstr_9 = field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxAmount._CurrencyID) { Memory.Copy(pstr_9, targetPtr, strlen_9); targetPtr += strlen_9; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxAmount.amount; targetPtr += 8; } { { byte* optheader_9 = targetPtr; *(optheader_9 + 0) = 0x00; targetPtr += 1; if(field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeID!= null) { int strlen_10 = field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeID.Length * 2; *(int*)targetPtr = strlen_10; targetPtr += sizeof(int); fixed(char* pstr_10 = field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeID) { Memory.Copy(pstr_10, targetPtr, strlen_10); targetPtr += strlen_10; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if( field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeAgencyID!= null) { if(field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeAgencyID!= null) { int strlen_10 = field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeAgencyID.Length * 2; *(int*)targetPtr = strlen_10; targetPtr += sizeof(int); fixed(char* pstr_10 = field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeAgencyID) { Memory.Copy(pstr_10, targetPtr, strlen_10); targetPtr += strlen_10; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_9 + 0) |= 0x01; } if(field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID.code!= null) { int strlen_10 = field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID.code.Length * 2; *(int*)targetPtr = strlen_10; targetPtr += sizeof(int); fixed(char* pstr_10 = field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID.code) { Memory.Copy(pstr_10, targetPtr, strlen_10); targetPtr += strlen_10; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } *(double*)targetPtr = field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_Percent; targetPtr += 8; { { byte* optheader_10 = targetPtr; *(optheader_10 + 0) = 0x00; targetPtr += 1; if(field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID!= null) { int strlen_11 = field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID.Length * 2; *(int*)targetPtr = strlen_11; targetPtr += sizeof(int); fixed(char* pstr_11 = field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID) { Memory.Copy(pstr_11, targetPtr, strlen_11); targetPtr += strlen_11; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if( field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID!= null) { if(field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID!= null) { int strlen_11 = field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID.Length * 2; *(int*)targetPtr = strlen_11; targetPtr += sizeof(int); fixed(char* pstr_11 = field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID) { Memory.Copy(pstr_11, targetPtr, strlen_11); targetPtr += strlen_11; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_10 + 0) |= 0x01; } if(field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID.code!= null) { int strlen_11 = field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID.code.Length * 2; *(int*)targetPtr = strlen_11; targetPtr += sizeof(int); fixed(char* pstr_11 = field.envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID.code) { Memory.Copy(pstr_11, targetPtr, strlen_11); targetPtr += strlen_11; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } } } } } } *(int*)storedPtr_6 = (int)(targetPtr - storedPtr_6 - 4); } } { { if(field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_LineExtensionAmount._CurrencyID!= null) { int strlen_7 = field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_LineExtensionAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_LineExtensionAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_LineExtensionAmount.amount; targetPtr += 8; } { if(field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxExclusiveAmount._CurrencyID!= null) { int strlen_7 = field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxExclusiveAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxExclusiveAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxExclusiveAmount.amount; targetPtr += 8; } { if(field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxInclusiveAmount._CurrencyID!= null) { int strlen_7 = field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxInclusiveAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxInclusiveAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxInclusiveAmount.amount; targetPtr += 8; } { if(field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_AllowanceTotalAmount._CurrencyID!= null) { int strlen_7 = field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_AllowanceTotalAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_AllowanceTotalAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_AllowanceTotalAmount.amount; targetPtr += 8; } { if(field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_ChargeTotalAmount._CurrencyID!= null) { int strlen_7 = field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_ChargeTotalAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_ChargeTotalAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_ChargeTotalAmount.amount; targetPtr += 8; } { if(field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PrepaidAmount._CurrencyID!= null) { int strlen_7 = field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PrepaidAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PrepaidAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PrepaidAmount.amount; targetPtr += 8; } { if(field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableRoundingAmount._CurrencyID!= null) { int strlen_7 = field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableRoundingAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableRoundingAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableRoundingAmount.amount; targetPtr += 8; } { if(field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableAmount._CurrencyID!= null) { int strlen_7 = field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = field.envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableAmount.amount; targetPtr += 8; } } { byte *storedPtr_5 = targetPtr; targetPtr += sizeof(int); if(field.envelope.content.claims.Value.cac_InvoiceLine!= null) { for(int iterator_5 = 0;iterator_5<field.envelope.content.claims.Value.cac_InvoiceLine.Count;++iterator_5) { { if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_ID!= null) { int strlen_7 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_ID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_ID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { *(ISO639_1_LanguageCodes*)targetPtr = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_Note._languageID; targetPtr += 1; if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_Note.note!= null) { int strlen_8 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_Note.note.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_Note.note) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } { if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_InvoicedQuantity._unitCode!= null) { int strlen_8 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_InvoicedQuantity._unitCode.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_InvoicedQuantity._unitCode) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(long*)targetPtr = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_InvoicedQuantity.quantity; targetPtr += 8; } { if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_LineExtensionAmount._CurrencyID!= null) { int strlen_8 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_LineExtensionAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_LineExtensionAmount._CurrencyID) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_LineExtensionAmount.amount; targetPtr += 8; } if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_AccountingCost!= null) { int strlen_7 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_AccountingCost.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_AccountingCost) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_OrderLineReference.cbc_LineID!= null) { int strlen_8 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_OrderLineReference.cbc_LineID.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_OrderLineReference.cbc_LineID) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } { byte *storedPtr_7 = targetPtr; targetPtr += sizeof(int); if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges!= null) { for(int iterator_7 = 0;iterator_7<field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges.Count;++iterator_7) { { *(bool*)targetPtr = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_ChargeIndicator; targetPtr += 1; if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_AllowanceChargeReason!= null) { int strlen_9 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_AllowanceChargeReason.Length * 2; *(int*)targetPtr = strlen_9; targetPtr += sizeof(int); fixed(char* pstr_9 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_AllowanceChargeReason) { Memory.Copy(pstr_9, targetPtr, strlen_9); targetPtr += strlen_9; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_Amount._CurrencyID!= null) { int strlen_10 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_Amount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_10; targetPtr += sizeof(int); fixed(char* pstr_10 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_Amount._CurrencyID) { Memory.Copy(pstr_10, targetPtr, strlen_10); targetPtr += strlen_10; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_Amount.amount; targetPtr += 8; } } } } *(int*)storedPtr_7 = (int)(targetPtr - storedPtr_7 - 4); } { { if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cbc_TaxAmount._CurrencyID!= null) { int strlen_9 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cbc_TaxAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_9; targetPtr += sizeof(int); fixed(char* pstr_9 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cbc_TaxAmount._CurrencyID) { Memory.Copy(pstr_9, targetPtr, strlen_9); targetPtr += strlen_9; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cbc_TaxAmount.amount; targetPtr += 8; } { byte *storedPtr_8 = targetPtr; targetPtr += sizeof(int); if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals!= null) { for(int iterator_8 = 0;iterator_8<field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals.Count;++iterator_8) { { { if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxableAmount._CurrencyID!= null) { int strlen_11 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxableAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_11; targetPtr += sizeof(int); fixed(char* pstr_11 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxableAmount._CurrencyID) { Memory.Copy(pstr_11, targetPtr, strlen_11); targetPtr += strlen_11; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxableAmount.amount; targetPtr += 8; } { if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxAmount._CurrencyID!= null) { int strlen_11 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_11; targetPtr += sizeof(int); fixed(char* pstr_11 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxAmount._CurrencyID) { Memory.Copy(pstr_11, targetPtr, strlen_11); targetPtr += strlen_11; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxAmount.amount; targetPtr += 8; } { { byte* optheader_11 = targetPtr; *(optheader_11 + 0) = 0x00; targetPtr += 1; if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeID!= null) { int strlen_12 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeID.Length * 2; *(int*)targetPtr = strlen_12; targetPtr += sizeof(int); fixed(char* pstr_12 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeID) { Memory.Copy(pstr_12, targetPtr, strlen_12); targetPtr += strlen_12; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if( field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeAgencyID!= null) { if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeAgencyID!= null) { int strlen_12 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeAgencyID.Length * 2; *(int*)targetPtr = strlen_12; targetPtr += sizeof(int); fixed(char* pstr_12 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeAgencyID) { Memory.Copy(pstr_12, targetPtr, strlen_12); targetPtr += strlen_12; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_11 + 0) |= 0x01; } if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID.code!= null) { int strlen_12 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID.code.Length * 2; *(int*)targetPtr = strlen_12; targetPtr += sizeof(int); fixed(char* pstr_12 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID.code) { Memory.Copy(pstr_12, targetPtr, strlen_12); targetPtr += strlen_12; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } *(double*)targetPtr = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_Percent; targetPtr += 8; { { byte* optheader_12 = targetPtr; *(optheader_12 + 0) = 0x00; targetPtr += 1; if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID!= null) { int strlen_13 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID.Length * 2; *(int*)targetPtr = strlen_13; targetPtr += sizeof(int); fixed(char* pstr_13 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID) { Memory.Copy(pstr_13, targetPtr, strlen_13); targetPtr += strlen_13; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if( field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID!= null) { if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID!= null) { int strlen_13 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID.Length * 2; *(int*)targetPtr = strlen_13; targetPtr += sizeof(int); fixed(char* pstr_13 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID) { Memory.Copy(pstr_13, targetPtr, strlen_13); targetPtr += strlen_13; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_12 + 0) |= 0x01; } if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID.code!= null) { int strlen_13 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID.code.Length * 2; *(int*)targetPtr = strlen_13; targetPtr += sizeof(int); fixed(char* pstr_13 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID.code) { Memory.Copy(pstr_13, targetPtr, strlen_13); targetPtr += strlen_13; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } } } } } } *(int*)storedPtr_8 = (int)(targetPtr - storedPtr_8 - 4); } } if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_ItemUdid!= null) { int strlen_7 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_ItemUdid.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_ItemUdid) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { { if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_PriceAmount._CurrencyID!= null) { int strlen_9 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_PriceAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_9; targetPtr += sizeof(int); fixed(char* pstr_9 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_PriceAmount._CurrencyID) { Memory.Copy(pstr_9, targetPtr, strlen_9); targetPtr += strlen_9; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_PriceAmount.amount; targetPtr += 8; } { if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_BaseQuantity._unitCode!= null) { int strlen_9 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_BaseQuantity._unitCode.Length * 2; *(int*)targetPtr = strlen_9; targetPtr += sizeof(int); fixed(char* pstr_9 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_BaseQuantity._unitCode) { Memory.Copy(pstr_9, targetPtr, strlen_9); targetPtr += strlen_9; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(long*)targetPtr = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_BaseQuantity.quantity; targetPtr += 8; } { *(bool*)targetPtr = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_ChargeIndicator; targetPtr += 1; if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_AllowanceChargeReason!= null) { int strlen_9 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_AllowanceChargeReason.Length * 2; *(int*)targetPtr = strlen_9; targetPtr += sizeof(int); fixed(char* pstr_9 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_AllowanceChargeReason) { Memory.Copy(pstr_9, targetPtr, strlen_9); targetPtr += strlen_9; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { if(field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_Amount._CurrencyID!= null) { int strlen_10 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_Amount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_10; targetPtr += sizeof(int); fixed(char* pstr_10 = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_Amount._CurrencyID) { Memory.Copy(pstr_10, targetPtr, strlen_10); targetPtr += strlen_10; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = field.envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_Amount.amount; targetPtr += 8; } } } } } } *(int*)storedPtr_5 = (int)(targetPtr - storedPtr_5 - 4); } }*(optheader_3 + 0) |= 0x02; } if( field.envelope.content.encryptedclaims!= null) { { if(field.envelope.content.encryptedclaims.Value.ciphertext16!= null) { int strlen_5 = field.envelope.content.encryptedclaims.Value.ciphertext16.Length * 2; *(int*)targetPtr = strlen_5; targetPtr += sizeof(int); fixed(char* pstr_5 = field.envelope.content.encryptedclaims.Value.ciphertext16) { Memory.Copy(pstr_5, targetPtr, strlen_5); targetPtr += strlen_5; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(field.envelope.content.encryptedclaims.Value.alg!= null) { int strlen_5 = field.envelope.content.encryptedclaims.Value.alg.Length * 2; *(int*)targetPtr = strlen_5; targetPtr += sizeof(int); fixed(char* pstr_5 = field.envelope.content.encryptedclaims.Value.alg) { Memory.Copy(pstr_5, targetPtr, strlen_5); targetPtr += strlen_5; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(field.envelope.content.encryptedclaims.Value.key!= null) { int strlen_5 = field.envelope.content.encryptedclaims.Value.key.Length * 2; *(int*)targetPtr = strlen_5; targetPtr += sizeof(int); fixed(char* pstr_5 = field.envelope.content.encryptedclaims.Value.key) { Memory.Copy(pstr_5, targetPtr, strlen_5); targetPtr += strlen_5; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } }*(optheader_3 + 0) |= 0x04; } } { byte* optheader_3 = targetPtr; *(optheader_3 + 0) = 0x00; targetPtr += 1; *(TRACredentialType*)targetPtr = field.envelope.label.credtype; targetPtr += 1; *(long*)targetPtr = field.envelope.label.version; targetPtr += 8; *(TRATrustLevel*)targetPtr = field.envelope.label.trustLevel; targetPtr += 1; *(TRAEncryptionFlag*)targetPtr = field.envelope.label.encryptionFlag; targetPtr += 1; if(field.envelope.label.notaryudid!= null) { int strlen_4 = field.envelope.label.notaryudid.Length * 2; *(int*)targetPtr = strlen_4; targetPtr += sizeof(int); fixed(char* pstr_4 = field.envelope.label.notaryudid) { Memory.Copy(pstr_4, targetPtr, strlen_4); targetPtr += strlen_4; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if( field.envelope.label.name!= null) { if(field.envelope.label.name!= null) { int strlen_4 = field.envelope.label.name.Length * 2; *(int*)targetPtr = strlen_4; targetPtr += sizeof(int); fixed(char* pstr_4 = field.envelope.label.name) { Memory.Copy(pstr_4, targetPtr, strlen_4); targetPtr += strlen_4; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_3 + 0) |= 0x01; } if( field.envelope.label.comment!= null) { if(field.envelope.label.comment!= null) { int strlen_4 = field.envelope.label.comment.Length * 2; *(int*)targetPtr = strlen_4; targetPtr += sizeof(int); fixed(char* pstr_4 = field.envelope.label.comment) { Memory.Copy(pstr_4, targetPtr, strlen_4); targetPtr += strlen_4; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_3 + 0) |= 0x02; } } } { byte* optheader_2 = targetPtr; *(optheader_2 + 0) = 0x00; targetPtr += 1; if( field.envelopeseal.hashedThumbprint64!= null) { if(field.envelopeseal.hashedThumbprint64!= null) { int strlen_3 = field.envelopeseal.hashedThumbprint64.Length * 2; *(int*)targetPtr = strlen_3; targetPtr += sizeof(int); fixed(char* pstr_3 = field.envelopeseal.hashedThumbprint64) { Memory.Copy(pstr_3, targetPtr, strlen_3); targetPtr += strlen_3; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_2 + 0) |= 0x01; } if( field.envelopeseal.signedHashSignature64!= null) { if(field.envelopeseal.signedHashSignature64!= null) { int strlen_3 = field.envelopeseal.signedHashSignature64.Length * 2; *(int*)targetPtr = strlen_3; targetPtr += sizeof(int); fixed(char* pstr_3 = field.envelopeseal.signedHashSignature64) { Memory.Copy(pstr_3, targetPtr, strlen_3); targetPtr += strlen_3; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_2 + 0) |= 0x02; } if( field.envelopeseal.notaryStamp!= null) { if(field.envelopeseal.notaryStamp!= null) { int strlen_3 = field.envelopeseal.notaryStamp.Length * 2; *(int*)targetPtr = strlen_3; targetPtr += sizeof(int); fixed(char* pstr_3 = field.envelopeseal.notaryStamp) { Memory.Copy(pstr_3, targetPtr, strlen_3); targetPtr += strlen_3; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_2 + 0) |= 0x04; } if( field.envelopeseal.comments!= null) { { byte *storedPtr_3 = targetPtr; targetPtr += sizeof(int); if(field.envelopeseal.comments!= null) { for(int iterator_3 = 0;iterator_3<field.envelopeseal.comments.Count;++iterator_3) { if(field.envelopeseal.comments[iterator_3]!= null) { int strlen_4 = field.envelopeseal.comments[iterator_3].Length * 2; *(int*)targetPtr = strlen_4; targetPtr += sizeof(int); fixed(char* pstr_4 = field.envelopeseal.comments[iterator_3]) { Memory.Copy(pstr_4, targetPtr, strlen_4); targetPtr += strlen_4; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } } *(int*)storedPtr_3 = (int)(targetPtr - storedPtr_3 - 4); } *(optheader_2 + 0) |= 0x08; } } }UBL21_Invoice2_Cell_Accessor ret; ret = UBL21_Invoice2_Cell_Accessor._get()._Setup(field.CellId, tmpcellptr, -1, 0, null); ret.m_cellId = field.CellId; return ret; } public static bool operator ==(UBL21_Invoice2_Cell_Accessor a, UBL21_Invoice2_Cell_Accessor b) { if (ReferenceEquals(a, b)) return true; if (ReferenceEquals(a, null) || ReferenceEquals(b, null)) return false; if (a.m_ptr == b.m_ptr) return true; byte* targetPtr = a.m_ptr; {{{ byte* optheader_5 = targetPtr; targetPtr += 1; targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int); if ((0 != (*(optheader_5 + 0) & 0x01))) { targetPtr += *(int*)targetPtr + sizeof(int); } if ((0 != (*(optheader_5 + 0) & 0x02))) { {targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; {targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int);}{ targetPtr += 1; targetPtr += *(int*)targetPtr + sizeof(int);} targetPtr += 8; {targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int);}targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 16; {targetPtr += *(int*)targetPtr + sizeof(int);}{ byte* optheader_9 = targetPtr; targetPtr += 1; targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int); if ((0 != (*(optheader_9 + 0) & 0x01))) { {targetPtr += *(int*)targetPtr + sizeof(int);} } }targetPtr += *(int*)targetPtr + sizeof(int);{targetPtr += *(int*)targetPtr + sizeof(int);}{targetPtr += *(int*)targetPtr + sizeof(int);}{targetPtr += *(int*)targetPtr + sizeof(int);}{ targetPtr += 8; {{ byte* optheader_13 = targetPtr; targetPtr += 1; targetPtr += *(int*)targetPtr + sizeof(int); if ((0 != (*(optheader_13 + 0) & 0x01))) { targetPtr += *(int*)targetPtr + sizeof(int); } targetPtr += *(int*)targetPtr + sizeof(int);}targetPtr += *(int*)targetPtr + sizeof(int);}}targetPtr += *(int*)targetPtr + sizeof(int);{{ targetPtr += 1; targetPtr += *(int*)targetPtr + sizeof(int);}}targetPtr += *(int*)targetPtr + sizeof(int);{{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }targetPtr += *(int*)targetPtr + sizeof(int);}{{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }}targetPtr += *(int*)targetPtr + sizeof(int);} } if ((0 != (*(optheader_5 + 0) & 0x04))) { {targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int);} } }{ byte* optheader_5 = targetPtr; targetPtr += 1; targetPtr += 11; targetPtr += *(int*)targetPtr + sizeof(int); if ((0 != (*(optheader_5 + 0) & 0x01))) { targetPtr += *(int*)targetPtr + sizeof(int); } if ((0 != (*(optheader_5 + 0) & 0x02))) { targetPtr += *(int*)targetPtr + sizeof(int); } }}{ byte* optheader_3 = targetPtr; targetPtr += 1; if ((0 != (*(optheader_3 + 0) & 0x01))) { targetPtr += *(int*)targetPtr + sizeof(int); } if ((0 != (*(optheader_3 + 0) & 0x02))) { targetPtr += *(int*)targetPtr + sizeof(int); } if ((0 != (*(optheader_3 + 0) & 0x04))) { targetPtr += *(int*)targetPtr + sizeof(int); } if ((0 != (*(optheader_3 + 0) & 0x08))) { targetPtr += *(int*)targetPtr + sizeof(int); } }} int lengthA = (int)(targetPtr - a.m_ptr); targetPtr = b.m_ptr; {{{ byte* optheader_5 = targetPtr; targetPtr += 1; targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int); if ((0 != (*(optheader_5 + 0) & 0x01))) { targetPtr += *(int*)targetPtr + sizeof(int); } if ((0 != (*(optheader_5 + 0) & 0x02))) { {targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; {targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int);}{ targetPtr += 1; targetPtr += *(int*)targetPtr + sizeof(int);} targetPtr += 8; {targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int);}targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 16; {targetPtr += *(int*)targetPtr + sizeof(int);}{ byte* optheader_9 = targetPtr; targetPtr += 1; targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int); if ((0 != (*(optheader_9 + 0) & 0x01))) { {targetPtr += *(int*)targetPtr + sizeof(int);} } }targetPtr += *(int*)targetPtr + sizeof(int);{targetPtr += *(int*)targetPtr + sizeof(int);}{targetPtr += *(int*)targetPtr + sizeof(int);}{targetPtr += *(int*)targetPtr + sizeof(int);}{ targetPtr += 8; {{ byte* optheader_13 = targetPtr; targetPtr += 1; targetPtr += *(int*)targetPtr + sizeof(int); if ((0 != (*(optheader_13 + 0) & 0x01))) { targetPtr += *(int*)targetPtr + sizeof(int); } targetPtr += *(int*)targetPtr + sizeof(int);}targetPtr += *(int*)targetPtr + sizeof(int);}}targetPtr += *(int*)targetPtr + sizeof(int);{{ targetPtr += 1; targetPtr += *(int*)targetPtr + sizeof(int);}}targetPtr += *(int*)targetPtr + sizeof(int);{{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }targetPtr += *(int*)targetPtr + sizeof(int);}{{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }{targetPtr += *(int*)targetPtr + sizeof(int); targetPtr += 8; }}targetPtr += *(int*)targetPtr + sizeof(int);} } if ((0 != (*(optheader_5 + 0) & 0x04))) { {targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int);targetPtr += *(int*)targetPtr + sizeof(int);} } }{ byte* optheader_5 = targetPtr; targetPtr += 1; targetPtr += 11; targetPtr += *(int*)targetPtr + sizeof(int); if ((0 != (*(optheader_5 + 0) & 0x01))) { targetPtr += *(int*)targetPtr + sizeof(int); } if ((0 != (*(optheader_5 + 0) & 0x02))) { targetPtr += *(int*)targetPtr + sizeof(int); } }}{ byte* optheader_3 = targetPtr; targetPtr += 1; if ((0 != (*(optheader_3 + 0) & 0x01))) { targetPtr += *(int*)targetPtr + sizeof(int); } if ((0 != (*(optheader_3 + 0) & 0x02))) { targetPtr += *(int*)targetPtr + sizeof(int); } if ((0 != (*(optheader_3 + 0) & 0x04))) { targetPtr += *(int*)targetPtr + sizeof(int); } if ((0 != (*(optheader_3 + 0) & 0x08))) { targetPtr += *(int*)targetPtr + sizeof(int); } }} int lengthB = (int)(targetPtr - b.m_ptr); if(lengthA != lengthB) return false; return Memory.Compare(a.m_ptr,b.m_ptr,lengthA); } public static bool operator != (UBL21_Invoice2_Cell_Accessor a, UBL21_Invoice2_Cell_Accessor b) { return !(a == b); } public static bool operator ==(UBL21_Invoice2_Cell_Accessor a, UBL21_Invoice2_Cell b) { UBL21_Invoice2_Cell_Accessor bb = b; return (a == bb); } public static bool operator !=(UBL21_Invoice2_Cell_Accessor a, UBL21_Invoice2_Cell b) { return !(a == b); } /// <summary> /// Get the size of the cell content, in bytes. /// </summary> public int CellSize { get { int size; Global.LocalStorage.LockedGetCellSize(this.CellId, this.m_cellEntryIndex, out size); return size; } } #region Internal private unsafe byte* _Resize_NonTx(byte* ptr, int ptr_offset, int delta) { int offset = (int)(ptr - m_ptr) + ptr_offset; m_ptr = Global.LocalStorage.ResizeCell((long)CellId, m_cellEntryIndex, offset, delta); return m_ptr + (offset - ptr_offset); } private unsafe byte* _Resize_Tx(byte* ptr, int ptr_offset, int delta) { int offset = (int)(ptr - m_ptr) + ptr_offset; m_ptr = Global.LocalStorage.ResizeCell(m_tx, (long)CellId, m_cellEntryIndex, offset, delta); return m_ptr + (offset - ptr_offset); } [MethodImpl(MethodImplOptions.AggressiveInlining)] internal unsafe UBL21_Invoice2_Cell_Accessor _Lock(long cellId, CellAccessOptions options) { ushort cellType; this.CellId = cellId; this.m_options = options; this.ResizeFunction = _Resize_NonTx; TrinityErrorCode eResult = Global.LocalStorage.GetLockedCellInfo(cellId, out _, out cellType, out this.m_ptr, out this.m_cellEntryIndex); switch (eResult) { case TrinityErrorCode.E_SUCCESS: { if (cellType != (ushort)CellType.UBL21_Invoice2_Cell) { Global.LocalStorage.ReleaseCellLock(cellId, this.m_cellEntryIndex); _put(this); Throw.wrong_cell_type(); } break; } case TrinityErrorCode.E_CELL_NOT_FOUND: { if ((options & CellAccessOptions.ThrowExceptionOnCellNotFound) != 0) { _put(this); Throw.cell_not_found(cellId); } else if ((options & CellAccessOptions.CreateNewOnCellNotFound) != 0) { byte[] defaultContent = construct(); int size = defaultContent.Length; eResult = Global.LocalStorage.AddOrUse(cellId, defaultContent, ref size, (ushort)CellType.UBL21_Invoice2_Cell, out this.m_ptr, out this.m_cellEntryIndex); if (eResult == TrinityErrorCode.E_WRONG_CELL_TYPE) { _put(this); Throw.wrong_cell_type(); } } else if ((options & CellAccessOptions.ReturnNullOnCellNotFound) != 0) { _put(this); return null; } else { _put(this); Throw.cell_not_found(cellId); } break; } default: _put(this); throw new NotImplementedException(); } return this; } [MethodImpl(MethodImplOptions.AggressiveInlining)] internal unsafe UBL21_Invoice2_Cell_Accessor _Lock(long cellId, CellAccessOptions options, LocalTransactionContext tx) { ushort cellType; this.CellId = cellId; this.m_options = options; this.m_tx = tx; this.ResizeFunction = _Resize_Tx; TrinityErrorCode eResult = Global.LocalStorage.GetLockedCellInfo(tx, cellId, out _, out cellType, out this.m_ptr, out this.m_cellEntryIndex); switch (eResult) { case TrinityErrorCode.E_SUCCESS: { if (cellType != (ushort)CellType.UBL21_Invoice2_Cell) { Global.LocalStorage.ReleaseCellLock(tx, cellId, this.m_cellEntryIndex); _put(this); Throw.wrong_cell_type(); } break; } case TrinityErrorCode.E_CELL_NOT_FOUND: { if ((options & CellAccessOptions.ThrowExceptionOnCellNotFound) != 0) { _put(this); Throw.cell_not_found(cellId); } else if ((options & CellAccessOptions.CreateNewOnCellNotFound) != 0) { byte[] defaultContent = construct(); int size = defaultContent.Length; eResult = Global.LocalStorage.AddOrUse(tx, cellId, defaultContent, ref size, (ushort)CellType.UBL21_Invoice2_Cell, out this.m_ptr, out this.m_cellEntryIndex); if (eResult == TrinityErrorCode.E_WRONG_CELL_TYPE) { _put(this); Throw.wrong_cell_type(); } } else if ((options & CellAccessOptions.ReturnNullOnCellNotFound) != 0) { _put(this); return null; } else { _put(this); Throw.cell_not_found(cellId); } break; } default: _put(this); throw new NotImplementedException(); } return this; } private class PoolPolicy : IPooledObjectPolicy<UBL21_Invoice2_Cell_Accessor> { public UBL21_Invoice2_Cell_Accessor Create() { return new UBL21_Invoice2_Cell_Accessor(); } public bool Return(UBL21_Invoice2_Cell_Accessor obj) { return !obj.m_IsIterator; } } private static DefaultObjectPool<UBL21_Invoice2_Cell_Accessor> s_accessor_pool = new DefaultObjectPool<UBL21_Invoice2_Cell_Accessor>(new PoolPolicy()); [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static UBL21_Invoice2_Cell_Accessor _get() => s_accessor_pool.Get(); [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static void _put(UBL21_Invoice2_Cell_Accessor item) => s_accessor_pool.Return(item); /// <summary> /// For internal use only. /// Caller guarantees that entry lock is obtained. /// Does not handle CellAccessOptions. Only copy to the accessor. /// </summary> [MethodImpl(MethodImplOptions.AggressiveInlining)] internal UBL21_Invoice2_Cell_Accessor _Setup(long CellId, byte* cellPtr, int entryIndex, CellAccessOptions options) { this.CellId = CellId; m_cellEntryIndex = entryIndex; m_options = options; m_ptr = cellPtr; m_tx = null; this.ResizeFunction = _Resize_NonTx; return this; } /// <summary> /// For internal use only. /// Caller guarantees that entry lock is obtained. /// Does not handle CellAccessOptions. Only copy to the accessor. /// </summary> [MethodImpl(MethodImplOptions.AggressiveInlining)] internal UBL21_Invoice2_Cell_Accessor _Setup(long CellId, byte* cellPtr, int entryIndex, CellAccessOptions options, LocalTransactionContext tx) { this.CellId = CellId; m_cellEntryIndex = entryIndex; m_options = options; m_ptr = cellPtr; m_tx = tx; this.ResizeFunction = _Resize_Tx; return this; } /// <summary> /// For internal use only. /// </summary> internal static UBL21_Invoice2_Cell_Accessor AllocIterativeAccessor(CellInfo info, LocalTransactionContext tx) { UBL21_Invoice2_Cell_Accessor accessor = new UBL21_Invoice2_Cell_Accessor(); accessor.m_IsIterator = true; if (tx != null) accessor._Setup(info.CellId, info.CellPtr, info.CellEntryIndex, 0, tx); else accessor._Setup(info.CellId, info.CellPtr, info.CellEntryIndex, 0); return accessor; } #endregion #region Public /// <summary> /// Dispose the accessor. /// If <c><see cref="Trinity.TrinityConfig.ReadOnly"/> == false</c>, /// the cell lock will be released. /// If write-ahead-log behavior is specified on <see cref="TDW.TRAServer.StorageExtension_UBL21_Invoice2_Cell.UseUBL21_Invoice2_Cell"/>, /// the changes will be committed to the write-ahead log. /// </summary> public void Dispose() { if (m_cellEntryIndex >= 0) { if ((m_options & c_WALFlags) != 0) { LocalMemoryStorage.CWriteAheadLog(this.CellId, this.m_ptr, this.CellSize, (ushort)CellType.UBL21_Invoice2_Cell, m_options); } if (!m_IsIterator) { if (m_tx == null) Global.LocalStorage.ReleaseCellLock(CellId, m_cellEntryIndex); else Global.LocalStorage.ReleaseCellLock(m_tx, CellId, m_cellEntryIndex); } } _put(this); } /// <summary> /// Get the cell type id. /// </summary> /// <returns>A 16-bit unsigned integer representing the cell type id.</returns> public ushort GetCellType() { ushort cellType; if (Global.LocalStorage.GetCellType(CellId, out cellType) == TrinityErrorCode.E_CELL_NOT_FOUND) { Throw.cell_not_found(); } return cellType; } /// <summary>Converts a UBL21_Invoice2_Cell_Accessor to its string representation, in JSON format.</summary> /// <returns>A string representation of the UBL21_Invoice2_Cell.</returns> public override string ToString() { return Serializer.ToString(this); } #endregion #region Lookup tables internal static StringLookupTable FieldLookupTable = new StringLookupTable( "envelope" , "envelopeseal" ); static HashSet<string> AppendToFieldRerouteSet = new HashSet<string>() { "envelope" , "envelopeseal" , }; #endregion #region ICell implementation public T GetField<T>(string fieldName) { int field_divider_idx = fieldName.IndexOf('.'); if (-1 != field_divider_idx) { string field_name_string = fieldName.Substring(0, field_divider_idx); switch (FieldLookupTable.Lookup(field_name_string)) { case -1: Throw.undefined_field(); break; case 0: return GenericFieldAccessor.GetField<T>(this.envelope, fieldName, field_divider_idx + 1); case 1: return GenericFieldAccessor.GetField<T>(this.envelopeseal, fieldName, field_divider_idx + 1); default: Throw.member_access_on_non_struct__field(field_name_string); break; } } switch (FieldLookupTable.Lookup(fieldName)) { case -1: Throw.undefined_field(); break; case 0: return TypeConverter<T>.ConvertFrom_UBL21_Invoice2_Envelope(this.envelope); case 1: return TypeConverter<T>.ConvertFrom_TRACredential_EnvelopeSeal(this.envelopeseal); } /* Should not reach here */ throw new Exception("Internal error T5005"); } public void SetField<T>(string fieldName, T value) { int field_divider_idx = fieldName.IndexOf('.'); if (-1 != field_divider_idx) { string field_name_string = fieldName.Substring(0, field_divider_idx); switch (FieldLookupTable.Lookup(field_name_string)) { case -1: Throw.undefined_field(); break; case 0: GenericFieldAccessor.SetField(this.envelope, fieldName, field_divider_idx + 1, value); break; case 1: GenericFieldAccessor.SetField(this.envelopeseal, fieldName, field_divider_idx + 1, value); break; default: Throw.member_access_on_non_struct__field(field_name_string); break; } return; } switch (FieldLookupTable.Lookup(fieldName)) { case -1: Throw.undefined_field(); break; case 0: { UBL21_Invoice2_Envelope conversion_result = TypeConverter<T>.ConvertTo_UBL21_Invoice2_Envelope(value); { this.envelope = conversion_result; } } break; case 1: { TRACredential_EnvelopeSeal conversion_result = TypeConverter<T>.ConvertTo_TRACredential_EnvelopeSeal(value); { this.envelopeseal = conversion_result; } } break; } } /// <summary> /// Tells if a field with the given name exists in the current cell. /// </summary> /// <param name="fieldName">The name of the field.</param> /// <returns>The existence of the field.</returns> public bool ContainsField(string fieldName) { switch (FieldLookupTable.Lookup(fieldName)) { case 0: return true; case 1: return true; default: return false; } } public void AppendToField<T>(string fieldName, T value) { if (AppendToFieldRerouteSet.Contains(fieldName)) { SetField(fieldName, value); return; } switch (FieldLookupTable.Lookup(fieldName)) { case -1: Throw.undefined_field(); break; default: Throw.target__field_not_list(); break; } } public long CellId { get { return m_cellId; } set { m_cellId = value; } } IEnumerable<KeyValuePair<string, T>> ICell.SelectFields<T>(string attributeKey, string attributeValue) { switch (TypeConverter<T>.type_id) { case 4: if (StorageSchema.UBL21_Invoice2_Cell_descriptor.check_attribute(StorageSchema.UBL21_Invoice2_Cell_descriptor.envelope, attributeKey, attributeValue)) yield return new KeyValuePair<string, T>("envelope", TypeConverter<T>.ConvertFrom_UBL21_Invoice2_Envelope(this.envelope)); if (StorageSchema.UBL21_Invoice2_Cell_descriptor.check_attribute(StorageSchema.UBL21_Invoice2_Cell_descriptor.envelopeseal, attributeKey, attributeValue)) yield return new KeyValuePair<string, T>("envelopeseal", TypeConverter<T>.ConvertFrom_TRACredential_EnvelopeSeal(this.envelopeseal)); break; case 5: if (StorageSchema.UBL21_Invoice2_Cell_descriptor.check_attribute(StorageSchema.UBL21_Invoice2_Cell_descriptor.envelope, attributeKey, attributeValue)) yield return new KeyValuePair<string, T>("envelope", TypeConverter<T>.ConvertFrom_UBL21_Invoice2_Envelope(this.envelope)); if (StorageSchema.UBL21_Invoice2_Cell_descriptor.check_attribute(StorageSchema.UBL21_Invoice2_Cell_descriptor.envelopeseal, attributeKey, attributeValue)) yield return new KeyValuePair<string, T>("envelopeseal", TypeConverter<T>.ConvertFrom_TRACredential_EnvelopeSeal(this.envelopeseal)); break; case 76: if (StorageSchema.UBL21_Invoice2_Cell_descriptor.check_attribute(StorageSchema.UBL21_Invoice2_Cell_descriptor.envelopeseal, attributeKey, attributeValue)) yield return new KeyValuePair<string, T>("envelopeseal", TypeConverter<T>.ConvertFrom_TRACredential_EnvelopeSeal(this.envelopeseal)); break; case 90: if (StorageSchema.UBL21_Invoice2_Cell_descriptor.check_attribute(StorageSchema.UBL21_Invoice2_Cell_descriptor.envelope, attributeKey, attributeValue)) yield return new KeyValuePair<string, T>("envelope", TypeConverter<T>.ConvertFrom_UBL21_Invoice2_Envelope(this.envelope)); break; case 96: if (StorageSchema.UBL21_Invoice2_Cell_descriptor.check_attribute(StorageSchema.UBL21_Invoice2_Cell_descriptor.envelope, attributeKey, attributeValue)) yield return new KeyValuePair<string, T>("envelope", TypeConverter<T>.ConvertFrom_UBL21_Invoice2_Envelope(this.envelope)); if (StorageSchema.UBL21_Invoice2_Cell_descriptor.check_attribute(StorageSchema.UBL21_Invoice2_Cell_descriptor.envelopeseal, attributeKey, attributeValue)) yield return new KeyValuePair<string, T>("envelopeseal", TypeConverter<T>.ConvertFrom_TRACredential_EnvelopeSeal(this.envelopeseal)); break; default: Throw.incompatible_with_cell(); break; } yield break; } #region enumerate value methods private IEnumerable<T> _enumerate_from_envelope<T>() { switch (TypeConverter<T>.type_id) { case 4: { yield return TypeConverter<T>.ConvertFrom_UBL21_Invoice2_Envelope(this.envelope); } break; case 5: { yield return TypeConverter<T>.ConvertFrom_UBL21_Invoice2_Envelope(this.envelope); } break; case 90: { yield return TypeConverter<T>.ConvertFrom_UBL21_Invoice2_Envelope(this.envelope); } break; case 96: { yield return TypeConverter<T>.ConvertFrom_UBL21_Invoice2_Envelope(this.envelope); } break; default: Throw.incompatible_with_cell(); break; } yield break; } private IEnumerable<T> _enumerate_from_envelopeseal<T>() { switch (TypeConverter<T>.type_id) { case 4: { yield return TypeConverter<T>.ConvertFrom_TRACredential_EnvelopeSeal(this.envelopeseal); } break; case 5: { yield return TypeConverter<T>.ConvertFrom_TRACredential_EnvelopeSeal(this.envelopeseal); } break; case 76: { yield return TypeConverter<T>.ConvertFrom_TRACredential_EnvelopeSeal(this.envelopeseal); } break; case 96: { yield return TypeConverter<T>.ConvertFrom_TRACredential_EnvelopeSeal(this.envelopeseal); } break; default: Throw.incompatible_with_cell(); break; } yield break; } private static StringLookupTable s_field_attribute_id_table = new StringLookupTable( ); #endregion public IEnumerable<T> EnumerateField<T>(string fieldName) { switch (FieldLookupTable.Lookup(fieldName)) { case 0: return _enumerate_from_envelope<T>(); case 1: return _enumerate_from_envelopeseal<T>(); default: Throw.undefined_field(); return null; } } IEnumerable<T> ICell.EnumerateValues<T>(string attributeKey, string attributeValue) { int attr_id; if (attributeKey == null) { foreach (var val in _enumerate_from_envelope<T>()) yield return val; foreach (var val in _enumerate_from_envelopeseal<T>()) yield return val; } else if (-1 != (attr_id = s_field_attribute_id_table.Lookup(attributeKey))) { switch (attr_id) { } } yield break; } IEnumerable<string> ICellDescriptor.GetFieldNames() { { yield return "envelope"; } { yield return "envelopeseal"; } } IAttributeCollection ICellDescriptor.GetFieldAttributes(string fieldName) { return StorageSchema.UBL21_Invoice2_Cell.GetFieldAttributes(fieldName); } IEnumerable<IFieldDescriptor> ICellDescriptor.GetFieldDescriptors() { return StorageSchema.UBL21_Invoice2_Cell.GetFieldDescriptors(); } string ITypeDescriptor.TypeName { get { return StorageSchema.s_cellTypeName_UBL21_Invoice2_Cell; } } Type ITypeDescriptor.Type { get { return StorageSchema.s_cellType_UBL21_Invoice2_Cell; } } bool ITypeDescriptor.IsOfType<T>() { return typeof(T) == StorageSchema.s_cellType_UBL21_Invoice2_Cell; } bool ITypeDescriptor.IsList() { return false; } IReadOnlyDictionary<string, string> IAttributeCollection.Attributes { get { return StorageSchema.UBL21_Invoice2_Cell.Attributes; } } string IAttributeCollection.GetAttributeValue(string attributeKey) { return StorageSchema.UBL21_Invoice2_Cell.GetAttributeValue(attributeKey); } ushort ICellDescriptor.CellType { get { return (ushort)CellType.UBL21_Invoice2_Cell; } } public ICellAccessor Serialize() { return this; } #endregion public ICell Deserialize() { return (UBL21_Invoice2_Cell)this; } } ///<summary> ///Provides interfaces for accessing UBL21_Invoice2_Cell cells ///on <see cref="Trinity.Storage.LocalMemorySotrage"/>. static public class StorageExtension_UBL21_Invoice2_Cell { #region IKeyValueStore non logging /// <summary> /// Adds a new cell of type UBL21_Invoice2_Cell to the key-value store if the cell Id does not exist, or updates an existing cell in the key-value store if the cell Id already exists. The value of the cell is specified in the method parameters. /// </summary> /// <param name="storage"/>A <see cref="Trinity.Storage.IKeyValueStore"/> instance.</param> /// <param name="cellId">A 64-bit cell Id.</param> /// <returns>true if saving succeeds; otherwise, false.</returns> public unsafe static bool SaveUBL21_Invoice2_Cell(this IKeyValueStore storage, long cellId, UBL21_Invoice2_Envelope envelope = default(UBL21_Invoice2_Envelope), TRACredential_EnvelopeSeal envelopeseal = default(TRACredential_EnvelopeSeal)) { byte* targetPtr; targetPtr = null; { { { targetPtr += 1; if(envelope.content.udid!= null) { int strlen_4 = envelope.content.udid.Length * 2; targetPtr += strlen_4+sizeof(int); }else { targetPtr += sizeof(int); } { targetPtr += sizeof(int); if(envelope.content.context!= null) { for(int iterator_4 = 0;iterator_4<envelope.content.context.Count;++iterator_4) { if(envelope.content.context[iterator_4]!= null) { int strlen_5 = envelope.content.context[iterator_4].Length * 2; targetPtr += strlen_5+sizeof(int); }else { targetPtr += sizeof(int); } } } } if( envelope.content.credentialsubjectudid!= null) { if(envelope.content.credentialsubjectudid!= null) { int strlen_4 = envelope.content.credentialsubjectudid.Length * 2; targetPtr += strlen_4+sizeof(int); }else { targetPtr += sizeof(int); } } if( envelope.content.claims!= null) { { if(envelope.content.claims.Value.cbc_UBLVersionID!= null) { int strlen_5 = envelope.content.claims.Value.cbc_UBLVersionID.Length * 2; targetPtr += strlen_5+sizeof(int); }else { targetPtr += sizeof(int); } if(envelope.content.claims.Value.cbc_ID!= null) { int strlen_5 = envelope.content.claims.Value.cbc_ID.Length * 2; targetPtr += strlen_5+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; { if(envelope.content.claims.Value.cbc_InvoiceTypeCode._listID!= null) { int strlen_6 = envelope.content.claims.Value.cbc_InvoiceTypeCode._listID.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } if(envelope.content.claims.Value.cbc_InvoiceTypeCode._listAgencyID!= null) { int strlen_6 = envelope.content.claims.Value.cbc_InvoiceTypeCode._listAgencyID.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } if(envelope.content.claims.Value.cbc_InvoiceTypeCode.code!= null) { int strlen_6 = envelope.content.claims.Value.cbc_InvoiceTypeCode.code.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } } { targetPtr += 1; if(envelope.content.claims.Value.cbc_Note.note!= null) { int strlen_6 = envelope.content.claims.Value.cbc_Note.note.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } }targetPtr += 8; { if(envelope.content.claims.Value.cbc_DocumentCurrencyCode._listID!= null) { int strlen_6 = envelope.content.claims.Value.cbc_DocumentCurrencyCode._listID.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } if(envelope.content.claims.Value.cbc_DocumentCurrencyCode._listAgencyID!= null) { int strlen_6 = envelope.content.claims.Value.cbc_DocumentCurrencyCode._listAgencyID.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } if(envelope.content.claims.Value.cbc_DocumentCurrencyCode.code!= null) { int strlen_6 = envelope.content.claims.Value.cbc_DocumentCurrencyCode.code.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } } if(envelope.content.claims.Value.cbc_AccountingCost!= null) { int strlen_5 = envelope.content.claims.Value.cbc_AccountingCost.Length * 2; targetPtr += strlen_5+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 16; { if(envelope.content.claims.Value.cbc_OrderReference.cbc_ID!= null) { int strlen_6 = envelope.content.claims.Value.cbc_OrderReference.cbc_ID.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } } { targetPtr += 1; if(envelope.content.claims.Value.cac_ContractDocumentReference.ID!= null) { int strlen_6 = envelope.content.claims.Value.cac_ContractDocumentReference.ID.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } if(envelope.content.claims.Value.cac_ContractDocumentReference.DocumentType!= null) { int strlen_6 = envelope.content.claims.Value.cac_ContractDocumentReference.DocumentType.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_ContractDocumentReference.cac_Attachment!= null) { { if(envelope.content.claims.Value.cac_ContractDocumentReference.cac_Attachment.Value.cac_ExternalReferenceUdid!= null) { int strlen_7 = envelope.content.claims.Value.cac_ContractDocumentReference.cac_Attachment.Value.cac_ExternalReferenceUdid.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } } } } { targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_AdditionalDocumentReferences!= null) { for(int iterator_5 = 0;iterator_5<envelope.content.claims.Value.cac_AdditionalDocumentReferences.Count;++iterator_5) { { targetPtr += 1; if(envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].ID!= null) { int strlen_7 = envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].ID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } if(envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].DocumentType!= null) { int strlen_7 = envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].DocumentType.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].cac_Attachment!= null) { { if(envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].cac_Attachment.Value.cac_ExternalReferenceUdid!= null) { int strlen_8 = envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].cac_Attachment.Value.cac_ExternalReferenceUdid.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } } } } } } } { if(envelope.content.claims.Value.cac_AccountingSupplierParty.cac_PartyUdid!= null) { int strlen_6 = envelope.content.claims.Value.cac_AccountingSupplierParty.cac_PartyUdid.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } } { if(envelope.content.claims.Value.cac_AccountingCustomerParty.cac_PartyUdid!= null) { int strlen_6 = envelope.content.claims.Value.cac_AccountingCustomerParty.cac_PartyUdid.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } } { if(envelope.content.claims.Value.cac_PayeeParty.cac_PartyUdid!= null) { int strlen_6 = envelope.content.claims.Value.cac_PayeeParty.cac_PartyUdid.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } } { targetPtr += 8; { { targetPtr += 1; if(envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeID!= null) { int strlen_8 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeID.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeAgencyID!= null) { if(envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeAgencyID!= null) { int strlen_8 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeAgencyID.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } } if(envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID.code!= null) { int strlen_8 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID.code.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } } if(envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cac_AddressUdid!= null) { int strlen_7 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cac_AddressUdid.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } } } if(envelope.content.claims.Value.cac_PaymentMeansUdid!= null) { int strlen_5 = envelope.content.claims.Value.cac_PaymentMeansUdid.Length * 2; targetPtr += strlen_5+sizeof(int); }else { targetPtr += sizeof(int); } { { targetPtr += 1; if(envelope.content.claims.Value.cac_PaymentTerms.cbc_Note.note!= null) { int strlen_7 = envelope.content.claims.Value.cac_PaymentTerms.cbc_Note.note.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } } } { targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_AllowanceCharges!= null) { for(int iterator_5 = 0;iterator_5<envelope.content.claims.Value.cac_AllowanceCharges.Count;++iterator_5) { { targetPtr += 1; if(envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_AllowanceChargeReason!= null) { int strlen_7 = envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_AllowanceChargeReason.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } { if(envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_Amount._CurrencyID!= null) { int strlen_8 = envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_Amount._CurrencyID.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } } } } } { { if(envelope.content.claims.Value.cac_TaxTotal.cbc_TaxAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_TaxTotal.cbc_TaxAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals!= null) { for(int iterator_6 = 0;iterator_6<envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals.Count;++iterator_6) { { { if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxableAmount._CurrencyID!= null) { int strlen_9 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxableAmount._CurrencyID.Length * 2; targetPtr += strlen_9+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxAmount._CurrencyID!= null) { int strlen_9 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxAmount._CurrencyID.Length * 2; targetPtr += strlen_9+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { { targetPtr += 1; if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeID!= null) { int strlen_10 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeID.Length * 2; targetPtr += strlen_10+sizeof(int); }else { targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeAgencyID!= null) { if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeAgencyID!= null) { int strlen_10 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeAgencyID.Length * 2; targetPtr += strlen_10+sizeof(int); }else { targetPtr += sizeof(int); } } if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID.code!= null) { int strlen_10 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID.code.Length * 2; targetPtr += strlen_10+sizeof(int); }else { targetPtr += sizeof(int); } } targetPtr += 8; { { targetPtr += 1; if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID!= null) { int strlen_11 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID.Length * 2; targetPtr += strlen_11+sizeof(int); }else { targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID!= null) { if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID!= null) { int strlen_11 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID.Length * 2; targetPtr += strlen_11+sizeof(int); }else { targetPtr += sizeof(int); } } if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID.code!= null) { int strlen_11 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID.code.Length * 2; targetPtr += strlen_11+sizeof(int); }else { targetPtr += sizeof(int); } } } } } } } } } { { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_LineExtensionAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_LineExtensionAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxExclusiveAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxExclusiveAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxInclusiveAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxInclusiveAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_AllowanceTotalAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_AllowanceTotalAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_ChargeTotalAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_ChargeTotalAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PrepaidAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PrepaidAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableRoundingAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableRoundingAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } } { targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_InvoiceLine!= null) { for(int iterator_5 = 0;iterator_5<envelope.content.claims.Value.cac_InvoiceLine.Count;++iterator_5) { { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_ID!= null) { int strlen_7 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_ID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } { targetPtr += 1; if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_Note.note!= null) { int strlen_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_Note.note.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_InvoicedQuantity._unitCode!= null) { int strlen_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_InvoicedQuantity._unitCode.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_LineExtensionAmount._CurrencyID!= null) { int strlen_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_LineExtensionAmount._CurrencyID.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_AccountingCost!= null) { int strlen_7 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_AccountingCost.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_OrderLineReference.cbc_LineID!= null) { int strlen_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_OrderLineReference.cbc_LineID.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } } { targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges!= null) { for(int iterator_7 = 0;iterator_7<envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges.Count;++iterator_7) { { targetPtr += 1; if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_AllowanceChargeReason!= null) { int strlen_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_AllowanceChargeReason.Length * 2; targetPtr += strlen_9+sizeof(int); }else { targetPtr += sizeof(int); } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_Amount._CurrencyID!= null) { int strlen_10 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_Amount._CurrencyID.Length * 2; targetPtr += strlen_10+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } } } } } { { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cbc_TaxAmount._CurrencyID!= null) { int strlen_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cbc_TaxAmount._CurrencyID.Length * 2; targetPtr += strlen_9+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals!= null) { for(int iterator_8 = 0;iterator_8<envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals.Count;++iterator_8) { { { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxableAmount._CurrencyID!= null) { int strlen_11 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxableAmount._CurrencyID.Length * 2; targetPtr += strlen_11+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxAmount._CurrencyID!= null) { int strlen_11 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxAmount._CurrencyID.Length * 2; targetPtr += strlen_11+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { { targetPtr += 1; if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeID!= null) { int strlen_12 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeID.Length * 2; targetPtr += strlen_12+sizeof(int); }else { targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeAgencyID!= null) { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeAgencyID!= null) { int strlen_12 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeAgencyID.Length * 2; targetPtr += strlen_12+sizeof(int); }else { targetPtr += sizeof(int); } } if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID.code!= null) { int strlen_12 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID.code.Length * 2; targetPtr += strlen_12+sizeof(int); }else { targetPtr += sizeof(int); } } targetPtr += 8; { { targetPtr += 1; if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID!= null) { int strlen_13 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID.Length * 2; targetPtr += strlen_13+sizeof(int); }else { targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID!= null) { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID!= null) { int strlen_13 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID.Length * 2; targetPtr += strlen_13+sizeof(int); }else { targetPtr += sizeof(int); } } if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID.code!= null) { int strlen_13 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID.code.Length * 2; targetPtr += strlen_13+sizeof(int); }else { targetPtr += sizeof(int); } } } } } } } } } if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_ItemUdid!= null) { int strlen_7 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_ItemUdid.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } { { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_PriceAmount._CurrencyID!= null) { int strlen_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_PriceAmount._CurrencyID.Length * 2; targetPtr += strlen_9+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_BaseQuantity._unitCode!= null) { int strlen_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_BaseQuantity._unitCode.Length * 2; targetPtr += strlen_9+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { targetPtr += 1; if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_AllowanceChargeReason!= null) { int strlen_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_AllowanceChargeReason.Length * 2; targetPtr += strlen_9+sizeof(int); }else { targetPtr += sizeof(int); } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_Amount._CurrencyID!= null) { int strlen_10 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_Amount._CurrencyID.Length * 2; targetPtr += strlen_10+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } } } } } } } } } if( envelope.content.encryptedclaims!= null) { { if(envelope.content.encryptedclaims.Value.ciphertext16!= null) { int strlen_5 = envelope.content.encryptedclaims.Value.ciphertext16.Length * 2; targetPtr += strlen_5+sizeof(int); }else { targetPtr += sizeof(int); } if(envelope.content.encryptedclaims.Value.alg!= null) { int strlen_5 = envelope.content.encryptedclaims.Value.alg.Length * 2; targetPtr += strlen_5+sizeof(int); }else { targetPtr += sizeof(int); } if(envelope.content.encryptedclaims.Value.key!= null) { int strlen_5 = envelope.content.encryptedclaims.Value.key.Length * 2; targetPtr += strlen_5+sizeof(int); }else { targetPtr += sizeof(int); } } } } { targetPtr += 1; targetPtr += 1; targetPtr += 8; targetPtr += 1; targetPtr += 1; if(envelope.label.notaryudid!= null) { int strlen_4 = envelope.label.notaryudid.Length * 2; targetPtr += strlen_4+sizeof(int); }else { targetPtr += sizeof(int); } if( envelope.label.name!= null) { if(envelope.label.name!= null) { int strlen_4 = envelope.label.name.Length * 2; targetPtr += strlen_4+sizeof(int); }else { targetPtr += sizeof(int); } } if( envelope.label.comment!= null) { if(envelope.label.comment!= null) { int strlen_4 = envelope.label.comment.Length * 2; targetPtr += strlen_4+sizeof(int); }else { targetPtr += sizeof(int); } } } } { targetPtr += 1; if( envelopeseal.hashedThumbprint64!= null) { if(envelopeseal.hashedThumbprint64!= null) { int strlen_3 = envelopeseal.hashedThumbprint64.Length * 2; targetPtr += strlen_3+sizeof(int); }else { targetPtr += sizeof(int); } } if( envelopeseal.signedHashSignature64!= null) { if(envelopeseal.signedHashSignature64!= null) { int strlen_3 = envelopeseal.signedHashSignature64.Length * 2; targetPtr += strlen_3+sizeof(int); }else { targetPtr += sizeof(int); } } if( envelopeseal.notaryStamp!= null) { if(envelopeseal.notaryStamp!= null) { int strlen_3 = envelopeseal.notaryStamp.Length * 2; targetPtr += strlen_3+sizeof(int); }else { targetPtr += sizeof(int); } } if( envelopeseal.comments!= null) { { targetPtr += sizeof(int); if(envelopeseal.comments!= null) { for(int iterator_3 = 0;iterator_3<envelopeseal.comments.Count;++iterator_3) { if(envelopeseal.comments[iterator_3]!= null) { int strlen_4 = envelopeseal.comments[iterator_3].Length * 2; targetPtr += strlen_4+sizeof(int); }else { targetPtr += sizeof(int); } } } } } } } byte[] tmpcell = new byte[(int)(targetPtr)]; fixed (byte* _tmpcellptr = tmpcell) { targetPtr = _tmpcellptr; { { { byte* optheader_3 = targetPtr; *(optheader_3 + 0) = 0x00; targetPtr += 1; if(envelope.content.udid!= null) { int strlen_4 = envelope.content.udid.Length * 2; *(int*)targetPtr = strlen_4; targetPtr += sizeof(int); fixed(char* pstr_4 = envelope.content.udid) { Memory.Copy(pstr_4, targetPtr, strlen_4); targetPtr += strlen_4; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { byte *storedPtr_4 = targetPtr; targetPtr += sizeof(int); if(envelope.content.context!= null) { for(int iterator_4 = 0;iterator_4<envelope.content.context.Count;++iterator_4) { if(envelope.content.context[iterator_4]!= null) { int strlen_5 = envelope.content.context[iterator_4].Length * 2; *(int*)targetPtr = strlen_5; targetPtr += sizeof(int); fixed(char* pstr_5 = envelope.content.context[iterator_4]) { Memory.Copy(pstr_5, targetPtr, strlen_5); targetPtr += strlen_5; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } } *(int*)storedPtr_4 = (int)(targetPtr - storedPtr_4 - 4); } if( envelope.content.credentialsubjectudid!= null) { if(envelope.content.credentialsubjectudid!= null) { int strlen_4 = envelope.content.credentialsubjectudid.Length * 2; *(int*)targetPtr = strlen_4; targetPtr += sizeof(int); fixed(char* pstr_4 = envelope.content.credentialsubjectudid) { Memory.Copy(pstr_4, targetPtr, strlen_4); targetPtr += strlen_4; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_3 + 0) |= 0x01; } if( envelope.content.claims!= null) { { if(envelope.content.claims.Value.cbc_UBLVersionID!= null) { int strlen_5 = envelope.content.claims.Value.cbc_UBLVersionID.Length * 2; *(int*)targetPtr = strlen_5; targetPtr += sizeof(int); fixed(char* pstr_5 = envelope.content.claims.Value.cbc_UBLVersionID) { Memory.Copy(pstr_5, targetPtr, strlen_5); targetPtr += strlen_5; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(envelope.content.claims.Value.cbc_ID!= null) { int strlen_5 = envelope.content.claims.Value.cbc_ID.Length * 2; *(int*)targetPtr = strlen_5; targetPtr += sizeof(int); fixed(char* pstr_5 = envelope.content.claims.Value.cbc_ID) { Memory.Copy(pstr_5, targetPtr, strlen_5); targetPtr += strlen_5; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { *(long*)targetPtr = envelope.content.claims.Value.cbc_IssueDate.ToBinary(); targetPtr += 8; } { if(envelope.content.claims.Value.cbc_InvoiceTypeCode._listID!= null) { int strlen_6 = envelope.content.claims.Value.cbc_InvoiceTypeCode._listID.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cbc_InvoiceTypeCode._listID) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(envelope.content.claims.Value.cbc_InvoiceTypeCode._listAgencyID!= null) { int strlen_6 = envelope.content.claims.Value.cbc_InvoiceTypeCode._listAgencyID.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cbc_InvoiceTypeCode._listAgencyID) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(envelope.content.claims.Value.cbc_InvoiceTypeCode.code!= null) { int strlen_6 = envelope.content.claims.Value.cbc_InvoiceTypeCode.code.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cbc_InvoiceTypeCode.code) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } { *(ISO639_1_LanguageCodes*)targetPtr = envelope.content.claims.Value.cbc_Note._languageID; targetPtr += 1; if(envelope.content.claims.Value.cbc_Note.note!= null) { int strlen_6 = envelope.content.claims.Value.cbc_Note.note.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cbc_Note.note) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } { *(long*)targetPtr = envelope.content.claims.Value.cbc_TaxPointDate.ToBinary(); targetPtr += 8; } { if(envelope.content.claims.Value.cbc_DocumentCurrencyCode._listID!= null) { int strlen_6 = envelope.content.claims.Value.cbc_DocumentCurrencyCode._listID.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cbc_DocumentCurrencyCode._listID) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(envelope.content.claims.Value.cbc_DocumentCurrencyCode._listAgencyID!= null) { int strlen_6 = envelope.content.claims.Value.cbc_DocumentCurrencyCode._listAgencyID.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cbc_DocumentCurrencyCode._listAgencyID) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(envelope.content.claims.Value.cbc_DocumentCurrencyCode.code!= null) { int strlen_6 = envelope.content.claims.Value.cbc_DocumentCurrencyCode.code.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cbc_DocumentCurrencyCode.code) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } if(envelope.content.claims.Value.cbc_AccountingCost!= null) { int strlen_5 = envelope.content.claims.Value.cbc_AccountingCost.Length * 2; *(int*)targetPtr = strlen_5; targetPtr += sizeof(int); fixed(char* pstr_5 = envelope.content.claims.Value.cbc_AccountingCost) { Memory.Copy(pstr_5, targetPtr, strlen_5); targetPtr += strlen_5; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { { *(long*)targetPtr = envelope.content.claims.Value.cbc_InvoicePeriod.cbc_StartDate.ToBinary(); targetPtr += 8; } { *(long*)targetPtr = envelope.content.claims.Value.cbc_InvoicePeriod.cbc_EndDate.ToBinary(); targetPtr += 8; } } { if(envelope.content.claims.Value.cbc_OrderReference.cbc_ID!= null) { int strlen_6 = envelope.content.claims.Value.cbc_OrderReference.cbc_ID.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cbc_OrderReference.cbc_ID) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } { byte* optheader_5 = targetPtr; *(optheader_5 + 0) = 0x00; targetPtr += 1; if(envelope.content.claims.Value.cac_ContractDocumentReference.ID!= null) { int strlen_6 = envelope.content.claims.Value.cac_ContractDocumentReference.ID.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cac_ContractDocumentReference.ID) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(envelope.content.claims.Value.cac_ContractDocumentReference.DocumentType!= null) { int strlen_6 = envelope.content.claims.Value.cac_ContractDocumentReference.DocumentType.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cac_ContractDocumentReference.DocumentType) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_ContractDocumentReference.cac_Attachment!= null) { { if(envelope.content.claims.Value.cac_ContractDocumentReference.cac_Attachment.Value.cac_ExternalReferenceUdid!= null) { int strlen_7 = envelope.content.claims.Value.cac_ContractDocumentReference.cac_Attachment.Value.cac_ExternalReferenceUdid.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_ContractDocumentReference.cac_Attachment.Value.cac_ExternalReferenceUdid) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } }*(optheader_5 + 0) |= 0x01; } } { byte *storedPtr_5 = targetPtr; targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_AdditionalDocumentReferences!= null) { for(int iterator_5 = 0;iterator_5<envelope.content.claims.Value.cac_AdditionalDocumentReferences.Count;++iterator_5) { { byte* optheader_6 = targetPtr; *(optheader_6 + 0) = 0x00; targetPtr += 1; if(envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].ID!= null) { int strlen_7 = envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].ID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].ID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].DocumentType!= null) { int strlen_7 = envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].DocumentType.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].DocumentType) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].cac_Attachment!= null) { { if(envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].cac_Attachment.Value.cac_ExternalReferenceUdid!= null) { int strlen_8 = envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].cac_Attachment.Value.cac_ExternalReferenceUdid.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].cac_Attachment.Value.cac_ExternalReferenceUdid) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } }*(optheader_6 + 0) |= 0x01; } } } } *(int*)storedPtr_5 = (int)(targetPtr - storedPtr_5 - 4); } { if(envelope.content.claims.Value.cac_AccountingSupplierParty.cac_PartyUdid!= null) { int strlen_6 = envelope.content.claims.Value.cac_AccountingSupplierParty.cac_PartyUdid.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cac_AccountingSupplierParty.cac_PartyUdid) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } { if(envelope.content.claims.Value.cac_AccountingCustomerParty.cac_PartyUdid!= null) { int strlen_6 = envelope.content.claims.Value.cac_AccountingCustomerParty.cac_PartyUdid.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cac_AccountingCustomerParty.cac_PartyUdid) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } { if(envelope.content.claims.Value.cac_PayeeParty.cac_PartyUdid!= null) { int strlen_6 = envelope.content.claims.Value.cac_PayeeParty.cac_PartyUdid.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cac_PayeeParty.cac_PartyUdid) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } { { *(long*)targetPtr = envelope.content.claims.Value.cac_Delivery.cbc_ActualDeliveryDate.ToBinary(); targetPtr += 8; } { { byte* optheader_7 = targetPtr; *(optheader_7 + 0) = 0x00; targetPtr += 1; if(envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeID!= null) { int strlen_8 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeID.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeID) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeAgencyID!= null) { if(envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeAgencyID!= null) { int strlen_8 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeAgencyID.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeAgencyID) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_7 + 0) |= 0x01; } if(envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID.code!= null) { int strlen_8 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID.code.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID.code) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } if(envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cac_AddressUdid!= null) { int strlen_7 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cac_AddressUdid.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cac_AddressUdid) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } } if(envelope.content.claims.Value.cac_PaymentMeansUdid!= null) { int strlen_5 = envelope.content.claims.Value.cac_PaymentMeansUdid.Length * 2; *(int*)targetPtr = strlen_5; targetPtr += sizeof(int); fixed(char* pstr_5 = envelope.content.claims.Value.cac_PaymentMeansUdid) { Memory.Copy(pstr_5, targetPtr, strlen_5); targetPtr += strlen_5; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { { *(ISO639_1_LanguageCodes*)targetPtr = envelope.content.claims.Value.cac_PaymentTerms.cbc_Note._languageID; targetPtr += 1; if(envelope.content.claims.Value.cac_PaymentTerms.cbc_Note.note!= null) { int strlen_7 = envelope.content.claims.Value.cac_PaymentTerms.cbc_Note.note.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_PaymentTerms.cbc_Note.note) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } } { byte *storedPtr_5 = targetPtr; targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_AllowanceCharges!= null) { for(int iterator_5 = 0;iterator_5<envelope.content.claims.Value.cac_AllowanceCharges.Count;++iterator_5) { { *(bool*)targetPtr = envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_ChargeIndicator; targetPtr += 1; if(envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_AllowanceChargeReason!= null) { int strlen_7 = envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_AllowanceChargeReason.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_AllowanceChargeReason) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { if(envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_Amount._CurrencyID!= null) { int strlen_8 = envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_Amount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_Amount._CurrencyID) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_Amount.amount; targetPtr += 8; } } } } *(int*)storedPtr_5 = (int)(targetPtr - storedPtr_5 - 4); } { { if(envelope.content.claims.Value.cac_TaxTotal.cbc_TaxAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_TaxTotal.cbc_TaxAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_TaxTotal.cbc_TaxAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_TaxTotal.cbc_TaxAmount.amount; targetPtr += 8; } { byte *storedPtr_6 = targetPtr; targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals!= null) { for(int iterator_6 = 0;iterator_6<envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals.Count;++iterator_6) { { { if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxableAmount._CurrencyID!= null) { int strlen_9 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxableAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_9; targetPtr += sizeof(int); fixed(char* pstr_9 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxableAmount._CurrencyID) { Memory.Copy(pstr_9, targetPtr, strlen_9); targetPtr += strlen_9; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxableAmount.amount; targetPtr += 8; } { if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxAmount._CurrencyID!= null) { int strlen_9 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_9; targetPtr += sizeof(int); fixed(char* pstr_9 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxAmount._CurrencyID) { Memory.Copy(pstr_9, targetPtr, strlen_9); targetPtr += strlen_9; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxAmount.amount; targetPtr += 8; } { { byte* optheader_9 = targetPtr; *(optheader_9 + 0) = 0x00; targetPtr += 1; if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeID!= null) { int strlen_10 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeID.Length * 2; *(int*)targetPtr = strlen_10; targetPtr += sizeof(int); fixed(char* pstr_10 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeID) { Memory.Copy(pstr_10, targetPtr, strlen_10); targetPtr += strlen_10; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeAgencyID!= null) { if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeAgencyID!= null) { int strlen_10 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeAgencyID.Length * 2; *(int*)targetPtr = strlen_10; targetPtr += sizeof(int); fixed(char* pstr_10 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeAgencyID) { Memory.Copy(pstr_10, targetPtr, strlen_10); targetPtr += strlen_10; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_9 + 0) |= 0x01; } if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID.code!= null) { int strlen_10 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID.code.Length * 2; *(int*)targetPtr = strlen_10; targetPtr += sizeof(int); fixed(char* pstr_10 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID.code) { Memory.Copy(pstr_10, targetPtr, strlen_10); targetPtr += strlen_10; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } *(double*)targetPtr = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_Percent; targetPtr += 8; { { byte* optheader_10 = targetPtr; *(optheader_10 + 0) = 0x00; targetPtr += 1; if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID!= null) { int strlen_11 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID.Length * 2; *(int*)targetPtr = strlen_11; targetPtr += sizeof(int); fixed(char* pstr_11 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID) { Memory.Copy(pstr_11, targetPtr, strlen_11); targetPtr += strlen_11; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID!= null) { if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID!= null) { int strlen_11 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID.Length * 2; *(int*)targetPtr = strlen_11; targetPtr += sizeof(int); fixed(char* pstr_11 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID) { Memory.Copy(pstr_11, targetPtr, strlen_11); targetPtr += strlen_11; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_10 + 0) |= 0x01; } if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID.code!= null) { int strlen_11 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID.code.Length * 2; *(int*)targetPtr = strlen_11; targetPtr += sizeof(int); fixed(char* pstr_11 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID.code) { Memory.Copy(pstr_11, targetPtr, strlen_11); targetPtr += strlen_11; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } } } } } } *(int*)storedPtr_6 = (int)(targetPtr - storedPtr_6 - 4); } } { { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_LineExtensionAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_LineExtensionAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_LineExtensionAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_LineExtensionAmount.amount; targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxExclusiveAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxExclusiveAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxExclusiveAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxExclusiveAmount.amount; targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxInclusiveAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxInclusiveAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxInclusiveAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxInclusiveAmount.amount; targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_AllowanceTotalAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_AllowanceTotalAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_AllowanceTotalAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_AllowanceTotalAmount.amount; targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_ChargeTotalAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_ChargeTotalAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_ChargeTotalAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_ChargeTotalAmount.amount; targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PrepaidAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PrepaidAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PrepaidAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PrepaidAmount.amount; targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableRoundingAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableRoundingAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableRoundingAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableRoundingAmount.amount; targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableAmount.amount; targetPtr += 8; } } { byte *storedPtr_5 = targetPtr; targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_InvoiceLine!= null) { for(int iterator_5 = 0;iterator_5<envelope.content.claims.Value.cac_InvoiceLine.Count;++iterator_5) { { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_ID!= null) { int strlen_7 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_ID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_ID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { *(ISO639_1_LanguageCodes*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_Note._languageID; targetPtr += 1; if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_Note.note!= null) { int strlen_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_Note.note.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_Note.note) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_InvoicedQuantity._unitCode!= null) { int strlen_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_InvoicedQuantity._unitCode.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_InvoicedQuantity._unitCode) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(long*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_InvoicedQuantity.quantity; targetPtr += 8; } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_LineExtensionAmount._CurrencyID!= null) { int strlen_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_LineExtensionAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_LineExtensionAmount._CurrencyID) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_LineExtensionAmount.amount; targetPtr += 8; } if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_AccountingCost!= null) { int strlen_7 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_AccountingCost.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_AccountingCost) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_OrderLineReference.cbc_LineID!= null) { int strlen_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_OrderLineReference.cbc_LineID.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_OrderLineReference.cbc_LineID) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } { byte *storedPtr_7 = targetPtr; targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges!= null) { for(int iterator_7 = 0;iterator_7<envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges.Count;++iterator_7) { { *(bool*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_ChargeIndicator; targetPtr += 1; if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_AllowanceChargeReason!= null) { int strlen_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_AllowanceChargeReason.Length * 2; *(int*)targetPtr = strlen_9; targetPtr += sizeof(int); fixed(char* pstr_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_AllowanceChargeReason) { Memory.Copy(pstr_9, targetPtr, strlen_9); targetPtr += strlen_9; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_Amount._CurrencyID!= null) { int strlen_10 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_Amount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_10; targetPtr += sizeof(int); fixed(char* pstr_10 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_Amount._CurrencyID) { Memory.Copy(pstr_10, targetPtr, strlen_10); targetPtr += strlen_10; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_Amount.amount; targetPtr += 8; } } } } *(int*)storedPtr_7 = (int)(targetPtr - storedPtr_7 - 4); } { { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cbc_TaxAmount._CurrencyID!= null) { int strlen_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cbc_TaxAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_9; targetPtr += sizeof(int); fixed(char* pstr_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cbc_TaxAmount._CurrencyID) { Memory.Copy(pstr_9, targetPtr, strlen_9); targetPtr += strlen_9; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cbc_TaxAmount.amount; targetPtr += 8; } { byte *storedPtr_8 = targetPtr; targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals!= null) { for(int iterator_8 = 0;iterator_8<envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals.Count;++iterator_8) { { { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxableAmount._CurrencyID!= null) { int strlen_11 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxableAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_11; targetPtr += sizeof(int); fixed(char* pstr_11 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxableAmount._CurrencyID) { Memory.Copy(pstr_11, targetPtr, strlen_11); targetPtr += strlen_11; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxableAmount.amount; targetPtr += 8; } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxAmount._CurrencyID!= null) { int strlen_11 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_11; targetPtr += sizeof(int); fixed(char* pstr_11 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxAmount._CurrencyID) { Memory.Copy(pstr_11, targetPtr, strlen_11); targetPtr += strlen_11; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxAmount.amount; targetPtr += 8; } { { byte* optheader_11 = targetPtr; *(optheader_11 + 0) = 0x00; targetPtr += 1; if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeID!= null) { int strlen_12 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeID.Length * 2; *(int*)targetPtr = strlen_12; targetPtr += sizeof(int); fixed(char* pstr_12 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeID) { Memory.Copy(pstr_12, targetPtr, strlen_12); targetPtr += strlen_12; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeAgencyID!= null) { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeAgencyID!= null) { int strlen_12 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeAgencyID.Length * 2; *(int*)targetPtr = strlen_12; targetPtr += sizeof(int); fixed(char* pstr_12 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeAgencyID) { Memory.Copy(pstr_12, targetPtr, strlen_12); targetPtr += strlen_12; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_11 + 0) |= 0x01; } if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID.code!= null) { int strlen_12 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID.code.Length * 2; *(int*)targetPtr = strlen_12; targetPtr += sizeof(int); fixed(char* pstr_12 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID.code) { Memory.Copy(pstr_12, targetPtr, strlen_12); targetPtr += strlen_12; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } *(double*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_Percent; targetPtr += 8; { { byte* optheader_12 = targetPtr; *(optheader_12 + 0) = 0x00; targetPtr += 1; if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID!= null) { int strlen_13 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID.Length * 2; *(int*)targetPtr = strlen_13; targetPtr += sizeof(int); fixed(char* pstr_13 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID) { Memory.Copy(pstr_13, targetPtr, strlen_13); targetPtr += strlen_13; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID!= null) { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID!= null) { int strlen_13 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID.Length * 2; *(int*)targetPtr = strlen_13; targetPtr += sizeof(int); fixed(char* pstr_13 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID) { Memory.Copy(pstr_13, targetPtr, strlen_13); targetPtr += strlen_13; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_12 + 0) |= 0x01; } if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID.code!= null) { int strlen_13 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID.code.Length * 2; *(int*)targetPtr = strlen_13; targetPtr += sizeof(int); fixed(char* pstr_13 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID.code) { Memory.Copy(pstr_13, targetPtr, strlen_13); targetPtr += strlen_13; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } } } } } } *(int*)storedPtr_8 = (int)(targetPtr - storedPtr_8 - 4); } } if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_ItemUdid!= null) { int strlen_7 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_ItemUdid.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_ItemUdid) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_PriceAmount._CurrencyID!= null) { int strlen_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_PriceAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_9; targetPtr += sizeof(int); fixed(char* pstr_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_PriceAmount._CurrencyID) { Memory.Copy(pstr_9, targetPtr, strlen_9); targetPtr += strlen_9; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_PriceAmount.amount; targetPtr += 8; } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_BaseQuantity._unitCode!= null) { int strlen_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_BaseQuantity._unitCode.Length * 2; *(int*)targetPtr = strlen_9; targetPtr += sizeof(int); fixed(char* pstr_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_BaseQuantity._unitCode) { Memory.Copy(pstr_9, targetPtr, strlen_9); targetPtr += strlen_9; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(long*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_BaseQuantity.quantity; targetPtr += 8; } { *(bool*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_ChargeIndicator; targetPtr += 1; if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_AllowanceChargeReason!= null) { int strlen_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_AllowanceChargeReason.Length * 2; *(int*)targetPtr = strlen_9; targetPtr += sizeof(int); fixed(char* pstr_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_AllowanceChargeReason) { Memory.Copy(pstr_9, targetPtr, strlen_9); targetPtr += strlen_9; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_Amount._CurrencyID!= null) { int strlen_10 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_Amount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_10; targetPtr += sizeof(int); fixed(char* pstr_10 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_Amount._CurrencyID) { Memory.Copy(pstr_10, targetPtr, strlen_10); targetPtr += strlen_10; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_Amount.amount; targetPtr += 8; } } } } } } *(int*)storedPtr_5 = (int)(targetPtr - storedPtr_5 - 4); } }*(optheader_3 + 0) |= 0x02; } if( envelope.content.encryptedclaims!= null) { { if(envelope.content.encryptedclaims.Value.ciphertext16!= null) { int strlen_5 = envelope.content.encryptedclaims.Value.ciphertext16.Length * 2; *(int*)targetPtr = strlen_5; targetPtr += sizeof(int); fixed(char* pstr_5 = envelope.content.encryptedclaims.Value.ciphertext16) { Memory.Copy(pstr_5, targetPtr, strlen_5); targetPtr += strlen_5; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(envelope.content.encryptedclaims.Value.alg!= null) { int strlen_5 = envelope.content.encryptedclaims.Value.alg.Length * 2; *(int*)targetPtr = strlen_5; targetPtr += sizeof(int); fixed(char* pstr_5 = envelope.content.encryptedclaims.Value.alg) { Memory.Copy(pstr_5, targetPtr, strlen_5); targetPtr += strlen_5; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(envelope.content.encryptedclaims.Value.key!= null) { int strlen_5 = envelope.content.encryptedclaims.Value.key.Length * 2; *(int*)targetPtr = strlen_5; targetPtr += sizeof(int); fixed(char* pstr_5 = envelope.content.encryptedclaims.Value.key) { Memory.Copy(pstr_5, targetPtr, strlen_5); targetPtr += strlen_5; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } }*(optheader_3 + 0) |= 0x04; } } { byte* optheader_3 = targetPtr; *(optheader_3 + 0) = 0x00; targetPtr += 1; *(TRACredentialType*)targetPtr = envelope.label.credtype; targetPtr += 1; *(long*)targetPtr = envelope.label.version; targetPtr += 8; *(TRATrustLevel*)targetPtr = envelope.label.trustLevel; targetPtr += 1; *(TRAEncryptionFlag*)targetPtr = envelope.label.encryptionFlag; targetPtr += 1; if(envelope.label.notaryudid!= null) { int strlen_4 = envelope.label.notaryudid.Length * 2; *(int*)targetPtr = strlen_4; targetPtr += sizeof(int); fixed(char* pstr_4 = envelope.label.notaryudid) { Memory.Copy(pstr_4, targetPtr, strlen_4); targetPtr += strlen_4; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if( envelope.label.name!= null) { if(envelope.label.name!= null) { int strlen_4 = envelope.label.name.Length * 2; *(int*)targetPtr = strlen_4; targetPtr += sizeof(int); fixed(char* pstr_4 = envelope.label.name) { Memory.Copy(pstr_4, targetPtr, strlen_4); targetPtr += strlen_4; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_3 + 0) |= 0x01; } if( envelope.label.comment!= null) { if(envelope.label.comment!= null) { int strlen_4 = envelope.label.comment.Length * 2; *(int*)targetPtr = strlen_4; targetPtr += sizeof(int); fixed(char* pstr_4 = envelope.label.comment) { Memory.Copy(pstr_4, targetPtr, strlen_4); targetPtr += strlen_4; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_3 + 0) |= 0x02; } } } { byte* optheader_2 = targetPtr; *(optheader_2 + 0) = 0x00; targetPtr += 1; if( envelopeseal.hashedThumbprint64!= null) { if(envelopeseal.hashedThumbprint64!= null) { int strlen_3 = envelopeseal.hashedThumbprint64.Length * 2; *(int*)targetPtr = strlen_3; targetPtr += sizeof(int); fixed(char* pstr_3 = envelopeseal.hashedThumbprint64) { Memory.Copy(pstr_3, targetPtr, strlen_3); targetPtr += strlen_3; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_2 + 0) |= 0x01; } if( envelopeseal.signedHashSignature64!= null) { if(envelopeseal.signedHashSignature64!= null) { int strlen_3 = envelopeseal.signedHashSignature64.Length * 2; *(int*)targetPtr = strlen_3; targetPtr += sizeof(int); fixed(char* pstr_3 = envelopeseal.signedHashSignature64) { Memory.Copy(pstr_3, targetPtr, strlen_3); targetPtr += strlen_3; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_2 + 0) |= 0x02; } if( envelopeseal.notaryStamp!= null) { if(envelopeseal.notaryStamp!= null) { int strlen_3 = envelopeseal.notaryStamp.Length * 2; *(int*)targetPtr = strlen_3; targetPtr += sizeof(int); fixed(char* pstr_3 = envelopeseal.notaryStamp) { Memory.Copy(pstr_3, targetPtr, strlen_3); targetPtr += strlen_3; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_2 + 0) |= 0x04; } if( envelopeseal.comments!= null) { { byte *storedPtr_3 = targetPtr; targetPtr += sizeof(int); if(envelopeseal.comments!= null) { for(int iterator_3 = 0;iterator_3<envelopeseal.comments.Count;++iterator_3) { if(envelopeseal.comments[iterator_3]!= null) { int strlen_4 = envelopeseal.comments[iterator_3].Length * 2; *(int*)targetPtr = strlen_4; targetPtr += sizeof(int); fixed(char* pstr_4 = envelopeseal.comments[iterator_3]) { Memory.Copy(pstr_4, targetPtr, strlen_4); targetPtr += strlen_4; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } } *(int*)storedPtr_3 = (int)(targetPtr - storedPtr_3 - 4); } *(optheader_2 + 0) |= 0x08; } } } } return storage.SaveCell(cellId, tmpcell, (ushort)CellType.UBL21_Invoice2_Cell) == TrinityErrorCode.E_SUCCESS; } /// <summary> /// Adds a new cell of type UBL21_Invoice2_Cell to the key-value store if the cell Id does not exist, or updates an existing cell in the key-value store if the cell Id already exists. The parameter <paramref name="cellId"/> overrides the cell id in the content object. /// </summary> /// <param name="storage"/>A <see cref="Trinity.Storage.IKeyValueStore"/> instance.</param> /// <param name="cellId">A 64-bit cell Id.</param> /// <param name="cellContent">The content of the cell.</param> /// <returns>true if saving succeeds; otherwise, false.</returns> public unsafe static bool SaveUBL21_Invoice2_Cell(this IKeyValueStore storage, long cellId, UBL21_Invoice2_Cell cellContent) { return SaveUBL21_Invoice2_Cell(storage, cellId , cellContent.envelope , cellContent.envelopeseal ); } /// <summary> /// Adds a new cell of type UBL21_Invoice2_Cell to the key-value store if the cell Id does not exist, or updates an existing cell in the key-value store if the cell Id already exists. Cell Id is specified by the CellId field in the content object. /// </summary> /// <param name="storage"/>A <see cref="Trinity.Storage.IKeyValueStore"/> instance.</param> /// <param name="cellContent">The content of the cell.</param> /// <returns>true if saving succeeds; otherwise, false.</returns> public unsafe static bool SaveUBL21_Invoice2_Cell(this IKeyValueStore storage, UBL21_Invoice2_Cell cellContent) { return SaveUBL21_Invoice2_Cell(storage, cellContent.CellId , cellContent.envelope , cellContent.envelopeseal ); } /// <summary> /// Loads the content of the specified cell. Any changes done to this object are not written to the store, unless /// the content object is saved back into the storage. /// <param name="storage"/>A <see cref="Trinity.Storage.IKeyValueStore"/> instance.</param> /// </summary> public unsafe static UBL21_Invoice2_Cell LoadUBL21_Invoice2_Cell(this IKeyValueStore storage, long cellId) { if (TrinityErrorCode.E_SUCCESS == storage.LoadCell(cellId, out var buff)) { fixed (byte* p = buff) { return UBL21_Invoice2_Cell_Accessor._get()._Setup(cellId, p, -1, 0); } } else { Throw.cell_not_found(); throw new Exception(); } } #endregion #region LocalMemoryStorage Non-Tx accessors /// <summary> /// Allocate a cell accessor on the specified cell, which interprets /// the cell as a UBL21_Invoice2_Cell. Any changes done to the accessor /// are written to the storage immediately. /// If <c><see cref="Trinity.TrinityConfig.ReadOnly"/> == false</c>, /// on calling this method, it attempts to acquire the lock of the cell, /// and blocks until it gets the lock. Otherwise this method is wait-free. /// </summary> /// <param name="storage">A <see cref="Trinity.Storage.LocalMemoryStorage"/> instance.</param> /// <param name="cellId">The id of the specified cell.</param> /// <param name="options">Specifies write-ahead logging behavior. Valid values are CellAccessOptions.StrongLogAhead(default) and CellAccessOptions.WeakLogAhead. Other values are ignored.</param> /// <returns>A <see cref="TDW.TRAServer.UBL21_Invoice2_Cell"/> instance.</returns> public unsafe static UBL21_Invoice2_Cell_Accessor UseUBL21_Invoice2_Cell(this Trinity.Storage.LocalMemoryStorage storage, long cellId, CellAccessOptions options) { return UBL21_Invoice2_Cell_Accessor._get()._Lock(cellId, options); } /// <summary> /// Allocate a cell accessor on the specified cell, which interprets /// the cell as a UBL21_Invoice2_Cell. Any changes done to the accessor /// are written to the storage immediately. /// If <c><see cref="Trinity.TrinityConfig.ReadOnly"/> == false</c>, /// on calling this method, it attempts to acquire the lock of the cell, /// and blocks until it gets the lock. /// </summary> /// <param name="storage">A <see cref="Trinity.Storage.LocalMemoryStorage"/> instance.</param> /// <param name="cellId">The id of the specified cell.</param> /// <returns>A <see cref="" + script.RootNamespace + ".UBL21_Invoice2_Cell"/> instance.</returns> public unsafe static UBL21_Invoice2_Cell_Accessor UseUBL21_Invoice2_Cell(this Trinity.Storage.LocalMemoryStorage storage, long cellId) { return UBL21_Invoice2_Cell_Accessor._get()._Lock(cellId, CellAccessOptions.ThrowExceptionOnCellNotFound); } #endregion #region LocalStorage Non-Tx logging /// <summary> /// Adds a new cell of type UBL21_Invoice2_Cell to the key-value store if the cell Id does not exist, or updates an existing cell in the key-value store if the cell Id already exists. The value of the cell is specified in the method parameters. /// </summary> /// <param name="storage"/>A <see cref="Trinity.Storage.LocalMemoryStorage"/> instance.</param> /// <param name="cellId">A 64-bit cell Id.</param> /// <param name="options">Specifies write-ahead logging behavior. Valid values are CellAccessOptions.StrongLogAhead(default) and CellAccessOptions.WeakLogAhead. Other values are ignored.</param> /// <returns>true if saving succeeds; otherwise, false.</returns> public unsafe static bool SaveUBL21_Invoice2_Cell(this Trinity.Storage.LocalMemoryStorage storage, CellAccessOptions options, long cellId, UBL21_Invoice2_Envelope envelope = default(UBL21_Invoice2_Envelope), TRACredential_EnvelopeSeal envelopeseal = default(TRACredential_EnvelopeSeal)) { byte* targetPtr; targetPtr = null; { { { targetPtr += 1; if(envelope.content.udid!= null) { int strlen_4 = envelope.content.udid.Length * 2; targetPtr += strlen_4+sizeof(int); }else { targetPtr += sizeof(int); } { targetPtr += sizeof(int); if(envelope.content.context!= null) { for(int iterator_4 = 0;iterator_4<envelope.content.context.Count;++iterator_4) { if(envelope.content.context[iterator_4]!= null) { int strlen_5 = envelope.content.context[iterator_4].Length * 2; targetPtr += strlen_5+sizeof(int); }else { targetPtr += sizeof(int); } } } } if( envelope.content.credentialsubjectudid!= null) { if(envelope.content.credentialsubjectudid!= null) { int strlen_4 = envelope.content.credentialsubjectudid.Length * 2; targetPtr += strlen_4+sizeof(int); }else { targetPtr += sizeof(int); } } if( envelope.content.claims!= null) { { if(envelope.content.claims.Value.cbc_UBLVersionID!= null) { int strlen_5 = envelope.content.claims.Value.cbc_UBLVersionID.Length * 2; targetPtr += strlen_5+sizeof(int); }else { targetPtr += sizeof(int); } if(envelope.content.claims.Value.cbc_ID!= null) { int strlen_5 = envelope.content.claims.Value.cbc_ID.Length * 2; targetPtr += strlen_5+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; { if(envelope.content.claims.Value.cbc_InvoiceTypeCode._listID!= null) { int strlen_6 = envelope.content.claims.Value.cbc_InvoiceTypeCode._listID.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } if(envelope.content.claims.Value.cbc_InvoiceTypeCode._listAgencyID!= null) { int strlen_6 = envelope.content.claims.Value.cbc_InvoiceTypeCode._listAgencyID.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } if(envelope.content.claims.Value.cbc_InvoiceTypeCode.code!= null) { int strlen_6 = envelope.content.claims.Value.cbc_InvoiceTypeCode.code.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } } { targetPtr += 1; if(envelope.content.claims.Value.cbc_Note.note!= null) { int strlen_6 = envelope.content.claims.Value.cbc_Note.note.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } }targetPtr += 8; { if(envelope.content.claims.Value.cbc_DocumentCurrencyCode._listID!= null) { int strlen_6 = envelope.content.claims.Value.cbc_DocumentCurrencyCode._listID.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } if(envelope.content.claims.Value.cbc_DocumentCurrencyCode._listAgencyID!= null) { int strlen_6 = envelope.content.claims.Value.cbc_DocumentCurrencyCode._listAgencyID.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } if(envelope.content.claims.Value.cbc_DocumentCurrencyCode.code!= null) { int strlen_6 = envelope.content.claims.Value.cbc_DocumentCurrencyCode.code.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } } if(envelope.content.claims.Value.cbc_AccountingCost!= null) { int strlen_5 = envelope.content.claims.Value.cbc_AccountingCost.Length * 2; targetPtr += strlen_5+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 16; { if(envelope.content.claims.Value.cbc_OrderReference.cbc_ID!= null) { int strlen_6 = envelope.content.claims.Value.cbc_OrderReference.cbc_ID.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } } { targetPtr += 1; if(envelope.content.claims.Value.cac_ContractDocumentReference.ID!= null) { int strlen_6 = envelope.content.claims.Value.cac_ContractDocumentReference.ID.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } if(envelope.content.claims.Value.cac_ContractDocumentReference.DocumentType!= null) { int strlen_6 = envelope.content.claims.Value.cac_ContractDocumentReference.DocumentType.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_ContractDocumentReference.cac_Attachment!= null) { { if(envelope.content.claims.Value.cac_ContractDocumentReference.cac_Attachment.Value.cac_ExternalReferenceUdid!= null) { int strlen_7 = envelope.content.claims.Value.cac_ContractDocumentReference.cac_Attachment.Value.cac_ExternalReferenceUdid.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } } } } { targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_AdditionalDocumentReferences!= null) { for(int iterator_5 = 0;iterator_5<envelope.content.claims.Value.cac_AdditionalDocumentReferences.Count;++iterator_5) { { targetPtr += 1; if(envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].ID!= null) { int strlen_7 = envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].ID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } if(envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].DocumentType!= null) { int strlen_7 = envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].DocumentType.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].cac_Attachment!= null) { { if(envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].cac_Attachment.Value.cac_ExternalReferenceUdid!= null) { int strlen_8 = envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].cac_Attachment.Value.cac_ExternalReferenceUdid.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } } } } } } } { if(envelope.content.claims.Value.cac_AccountingSupplierParty.cac_PartyUdid!= null) { int strlen_6 = envelope.content.claims.Value.cac_AccountingSupplierParty.cac_PartyUdid.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } } { if(envelope.content.claims.Value.cac_AccountingCustomerParty.cac_PartyUdid!= null) { int strlen_6 = envelope.content.claims.Value.cac_AccountingCustomerParty.cac_PartyUdid.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } } { if(envelope.content.claims.Value.cac_PayeeParty.cac_PartyUdid!= null) { int strlen_6 = envelope.content.claims.Value.cac_PayeeParty.cac_PartyUdid.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } } { targetPtr += 8; { { targetPtr += 1; if(envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeID!= null) { int strlen_8 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeID.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeAgencyID!= null) { if(envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeAgencyID!= null) { int strlen_8 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeAgencyID.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } } if(envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID.code!= null) { int strlen_8 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID.code.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } } if(envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cac_AddressUdid!= null) { int strlen_7 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cac_AddressUdid.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } } } if(envelope.content.claims.Value.cac_PaymentMeansUdid!= null) { int strlen_5 = envelope.content.claims.Value.cac_PaymentMeansUdid.Length * 2; targetPtr += strlen_5+sizeof(int); }else { targetPtr += sizeof(int); } { { targetPtr += 1; if(envelope.content.claims.Value.cac_PaymentTerms.cbc_Note.note!= null) { int strlen_7 = envelope.content.claims.Value.cac_PaymentTerms.cbc_Note.note.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } } } { targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_AllowanceCharges!= null) { for(int iterator_5 = 0;iterator_5<envelope.content.claims.Value.cac_AllowanceCharges.Count;++iterator_5) { { targetPtr += 1; if(envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_AllowanceChargeReason!= null) { int strlen_7 = envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_AllowanceChargeReason.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } { if(envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_Amount._CurrencyID!= null) { int strlen_8 = envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_Amount._CurrencyID.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } } } } } { { if(envelope.content.claims.Value.cac_TaxTotal.cbc_TaxAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_TaxTotal.cbc_TaxAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals!= null) { for(int iterator_6 = 0;iterator_6<envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals.Count;++iterator_6) { { { if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxableAmount._CurrencyID!= null) { int strlen_9 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxableAmount._CurrencyID.Length * 2; targetPtr += strlen_9+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxAmount._CurrencyID!= null) { int strlen_9 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxAmount._CurrencyID.Length * 2; targetPtr += strlen_9+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { { targetPtr += 1; if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeID!= null) { int strlen_10 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeID.Length * 2; targetPtr += strlen_10+sizeof(int); }else { targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeAgencyID!= null) { if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeAgencyID!= null) { int strlen_10 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeAgencyID.Length * 2; targetPtr += strlen_10+sizeof(int); }else { targetPtr += sizeof(int); } } if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID.code!= null) { int strlen_10 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID.code.Length * 2; targetPtr += strlen_10+sizeof(int); }else { targetPtr += sizeof(int); } } targetPtr += 8; { { targetPtr += 1; if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID!= null) { int strlen_11 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID.Length * 2; targetPtr += strlen_11+sizeof(int); }else { targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID!= null) { if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID!= null) { int strlen_11 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID.Length * 2; targetPtr += strlen_11+sizeof(int); }else { targetPtr += sizeof(int); } } if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID.code!= null) { int strlen_11 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID.code.Length * 2; targetPtr += strlen_11+sizeof(int); }else { targetPtr += sizeof(int); } } } } } } } } } { { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_LineExtensionAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_LineExtensionAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxExclusiveAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxExclusiveAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxInclusiveAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxInclusiveAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_AllowanceTotalAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_AllowanceTotalAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_ChargeTotalAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_ChargeTotalAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PrepaidAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PrepaidAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableRoundingAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableRoundingAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } } { targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_InvoiceLine!= null) { for(int iterator_5 = 0;iterator_5<envelope.content.claims.Value.cac_InvoiceLine.Count;++iterator_5) { { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_ID!= null) { int strlen_7 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_ID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } { targetPtr += 1; if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_Note.note!= null) { int strlen_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_Note.note.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_InvoicedQuantity._unitCode!= null) { int strlen_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_InvoicedQuantity._unitCode.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_LineExtensionAmount._CurrencyID!= null) { int strlen_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_LineExtensionAmount._CurrencyID.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_AccountingCost!= null) { int strlen_7 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_AccountingCost.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_OrderLineReference.cbc_LineID!= null) { int strlen_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_OrderLineReference.cbc_LineID.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } } { targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges!= null) { for(int iterator_7 = 0;iterator_7<envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges.Count;++iterator_7) { { targetPtr += 1; if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_AllowanceChargeReason!= null) { int strlen_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_AllowanceChargeReason.Length * 2; targetPtr += strlen_9+sizeof(int); }else { targetPtr += sizeof(int); } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_Amount._CurrencyID!= null) { int strlen_10 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_Amount._CurrencyID.Length * 2; targetPtr += strlen_10+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } } } } } { { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cbc_TaxAmount._CurrencyID!= null) { int strlen_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cbc_TaxAmount._CurrencyID.Length * 2; targetPtr += strlen_9+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals!= null) { for(int iterator_8 = 0;iterator_8<envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals.Count;++iterator_8) { { { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxableAmount._CurrencyID!= null) { int strlen_11 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxableAmount._CurrencyID.Length * 2; targetPtr += strlen_11+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxAmount._CurrencyID!= null) { int strlen_11 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxAmount._CurrencyID.Length * 2; targetPtr += strlen_11+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { { targetPtr += 1; if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeID!= null) { int strlen_12 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeID.Length * 2; targetPtr += strlen_12+sizeof(int); }else { targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeAgencyID!= null) { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeAgencyID!= null) { int strlen_12 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeAgencyID.Length * 2; targetPtr += strlen_12+sizeof(int); }else { targetPtr += sizeof(int); } } if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID.code!= null) { int strlen_12 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID.code.Length * 2; targetPtr += strlen_12+sizeof(int); }else { targetPtr += sizeof(int); } } targetPtr += 8; { { targetPtr += 1; if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID!= null) { int strlen_13 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID.Length * 2; targetPtr += strlen_13+sizeof(int); }else { targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID!= null) { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID!= null) { int strlen_13 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID.Length * 2; targetPtr += strlen_13+sizeof(int); }else { targetPtr += sizeof(int); } } if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID.code!= null) { int strlen_13 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID.code.Length * 2; targetPtr += strlen_13+sizeof(int); }else { targetPtr += sizeof(int); } } } } } } } } } if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_ItemUdid!= null) { int strlen_7 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_ItemUdid.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } { { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_PriceAmount._CurrencyID!= null) { int strlen_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_PriceAmount._CurrencyID.Length * 2; targetPtr += strlen_9+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_BaseQuantity._unitCode!= null) { int strlen_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_BaseQuantity._unitCode.Length * 2; targetPtr += strlen_9+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { targetPtr += 1; if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_AllowanceChargeReason!= null) { int strlen_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_AllowanceChargeReason.Length * 2; targetPtr += strlen_9+sizeof(int); }else { targetPtr += sizeof(int); } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_Amount._CurrencyID!= null) { int strlen_10 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_Amount._CurrencyID.Length * 2; targetPtr += strlen_10+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } } } } } } } } } if( envelope.content.encryptedclaims!= null) { { if(envelope.content.encryptedclaims.Value.ciphertext16!= null) { int strlen_5 = envelope.content.encryptedclaims.Value.ciphertext16.Length * 2; targetPtr += strlen_5+sizeof(int); }else { targetPtr += sizeof(int); } if(envelope.content.encryptedclaims.Value.alg!= null) { int strlen_5 = envelope.content.encryptedclaims.Value.alg.Length * 2; targetPtr += strlen_5+sizeof(int); }else { targetPtr += sizeof(int); } if(envelope.content.encryptedclaims.Value.key!= null) { int strlen_5 = envelope.content.encryptedclaims.Value.key.Length * 2; targetPtr += strlen_5+sizeof(int); }else { targetPtr += sizeof(int); } } } } { targetPtr += 1; targetPtr += 1; targetPtr += 8; targetPtr += 1; targetPtr += 1; if(envelope.label.notaryudid!= null) { int strlen_4 = envelope.label.notaryudid.Length * 2; targetPtr += strlen_4+sizeof(int); }else { targetPtr += sizeof(int); } if( envelope.label.name!= null) { if(envelope.label.name!= null) { int strlen_4 = envelope.label.name.Length * 2; targetPtr += strlen_4+sizeof(int); }else { targetPtr += sizeof(int); } } if( envelope.label.comment!= null) { if(envelope.label.comment!= null) { int strlen_4 = envelope.label.comment.Length * 2; targetPtr += strlen_4+sizeof(int); }else { targetPtr += sizeof(int); } } } } { targetPtr += 1; if( envelopeseal.hashedThumbprint64!= null) { if(envelopeseal.hashedThumbprint64!= null) { int strlen_3 = envelopeseal.hashedThumbprint64.Length * 2; targetPtr += strlen_3+sizeof(int); }else { targetPtr += sizeof(int); } } if( envelopeseal.signedHashSignature64!= null) { if(envelopeseal.signedHashSignature64!= null) { int strlen_3 = envelopeseal.signedHashSignature64.Length * 2; targetPtr += strlen_3+sizeof(int); }else { targetPtr += sizeof(int); } } if( envelopeseal.notaryStamp!= null) { if(envelopeseal.notaryStamp!= null) { int strlen_3 = envelopeseal.notaryStamp.Length * 2; targetPtr += strlen_3+sizeof(int); }else { targetPtr += sizeof(int); } } if( envelopeseal.comments!= null) { { targetPtr += sizeof(int); if(envelopeseal.comments!= null) { for(int iterator_3 = 0;iterator_3<envelopeseal.comments.Count;++iterator_3) { if(envelopeseal.comments[iterator_3]!= null) { int strlen_4 = envelopeseal.comments[iterator_3].Length * 2; targetPtr += strlen_4+sizeof(int); }else { targetPtr += sizeof(int); } } } } } } } byte[] tmpcell = new byte[(int)(targetPtr)]; fixed (byte* _tmpcellptr = tmpcell) { targetPtr = _tmpcellptr; { { { byte* optheader_3 = targetPtr; *(optheader_3 + 0) = 0x00; targetPtr += 1; if(envelope.content.udid!= null) { int strlen_4 = envelope.content.udid.Length * 2; *(int*)targetPtr = strlen_4; targetPtr += sizeof(int); fixed(char* pstr_4 = envelope.content.udid) { Memory.Copy(pstr_4, targetPtr, strlen_4); targetPtr += strlen_4; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { byte *storedPtr_4 = targetPtr; targetPtr += sizeof(int); if(envelope.content.context!= null) { for(int iterator_4 = 0;iterator_4<envelope.content.context.Count;++iterator_4) { if(envelope.content.context[iterator_4]!= null) { int strlen_5 = envelope.content.context[iterator_4].Length * 2; *(int*)targetPtr = strlen_5; targetPtr += sizeof(int); fixed(char* pstr_5 = envelope.content.context[iterator_4]) { Memory.Copy(pstr_5, targetPtr, strlen_5); targetPtr += strlen_5; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } } *(int*)storedPtr_4 = (int)(targetPtr - storedPtr_4 - 4); } if( envelope.content.credentialsubjectudid!= null) { if(envelope.content.credentialsubjectudid!= null) { int strlen_4 = envelope.content.credentialsubjectudid.Length * 2; *(int*)targetPtr = strlen_4; targetPtr += sizeof(int); fixed(char* pstr_4 = envelope.content.credentialsubjectudid) { Memory.Copy(pstr_4, targetPtr, strlen_4); targetPtr += strlen_4; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_3 + 0) |= 0x01; } if( envelope.content.claims!= null) { { if(envelope.content.claims.Value.cbc_UBLVersionID!= null) { int strlen_5 = envelope.content.claims.Value.cbc_UBLVersionID.Length * 2; *(int*)targetPtr = strlen_5; targetPtr += sizeof(int); fixed(char* pstr_5 = envelope.content.claims.Value.cbc_UBLVersionID) { Memory.Copy(pstr_5, targetPtr, strlen_5); targetPtr += strlen_5; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(envelope.content.claims.Value.cbc_ID!= null) { int strlen_5 = envelope.content.claims.Value.cbc_ID.Length * 2; *(int*)targetPtr = strlen_5; targetPtr += sizeof(int); fixed(char* pstr_5 = envelope.content.claims.Value.cbc_ID) { Memory.Copy(pstr_5, targetPtr, strlen_5); targetPtr += strlen_5; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { *(long*)targetPtr = envelope.content.claims.Value.cbc_IssueDate.ToBinary(); targetPtr += 8; } { if(envelope.content.claims.Value.cbc_InvoiceTypeCode._listID!= null) { int strlen_6 = envelope.content.claims.Value.cbc_InvoiceTypeCode._listID.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cbc_InvoiceTypeCode._listID) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(envelope.content.claims.Value.cbc_InvoiceTypeCode._listAgencyID!= null) { int strlen_6 = envelope.content.claims.Value.cbc_InvoiceTypeCode._listAgencyID.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cbc_InvoiceTypeCode._listAgencyID) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(envelope.content.claims.Value.cbc_InvoiceTypeCode.code!= null) { int strlen_6 = envelope.content.claims.Value.cbc_InvoiceTypeCode.code.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cbc_InvoiceTypeCode.code) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } { *(ISO639_1_LanguageCodes*)targetPtr = envelope.content.claims.Value.cbc_Note._languageID; targetPtr += 1; if(envelope.content.claims.Value.cbc_Note.note!= null) { int strlen_6 = envelope.content.claims.Value.cbc_Note.note.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cbc_Note.note) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } { *(long*)targetPtr = envelope.content.claims.Value.cbc_TaxPointDate.ToBinary(); targetPtr += 8; } { if(envelope.content.claims.Value.cbc_DocumentCurrencyCode._listID!= null) { int strlen_6 = envelope.content.claims.Value.cbc_DocumentCurrencyCode._listID.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cbc_DocumentCurrencyCode._listID) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(envelope.content.claims.Value.cbc_DocumentCurrencyCode._listAgencyID!= null) { int strlen_6 = envelope.content.claims.Value.cbc_DocumentCurrencyCode._listAgencyID.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cbc_DocumentCurrencyCode._listAgencyID) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(envelope.content.claims.Value.cbc_DocumentCurrencyCode.code!= null) { int strlen_6 = envelope.content.claims.Value.cbc_DocumentCurrencyCode.code.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cbc_DocumentCurrencyCode.code) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } if(envelope.content.claims.Value.cbc_AccountingCost!= null) { int strlen_5 = envelope.content.claims.Value.cbc_AccountingCost.Length * 2; *(int*)targetPtr = strlen_5; targetPtr += sizeof(int); fixed(char* pstr_5 = envelope.content.claims.Value.cbc_AccountingCost) { Memory.Copy(pstr_5, targetPtr, strlen_5); targetPtr += strlen_5; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { { *(long*)targetPtr = envelope.content.claims.Value.cbc_InvoicePeriod.cbc_StartDate.ToBinary(); targetPtr += 8; } { *(long*)targetPtr = envelope.content.claims.Value.cbc_InvoicePeriod.cbc_EndDate.ToBinary(); targetPtr += 8; } } { if(envelope.content.claims.Value.cbc_OrderReference.cbc_ID!= null) { int strlen_6 = envelope.content.claims.Value.cbc_OrderReference.cbc_ID.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cbc_OrderReference.cbc_ID) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } { byte* optheader_5 = targetPtr; *(optheader_5 + 0) = 0x00; targetPtr += 1; if(envelope.content.claims.Value.cac_ContractDocumentReference.ID!= null) { int strlen_6 = envelope.content.claims.Value.cac_ContractDocumentReference.ID.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cac_ContractDocumentReference.ID) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(envelope.content.claims.Value.cac_ContractDocumentReference.DocumentType!= null) { int strlen_6 = envelope.content.claims.Value.cac_ContractDocumentReference.DocumentType.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cac_ContractDocumentReference.DocumentType) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_ContractDocumentReference.cac_Attachment!= null) { { if(envelope.content.claims.Value.cac_ContractDocumentReference.cac_Attachment.Value.cac_ExternalReferenceUdid!= null) { int strlen_7 = envelope.content.claims.Value.cac_ContractDocumentReference.cac_Attachment.Value.cac_ExternalReferenceUdid.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_ContractDocumentReference.cac_Attachment.Value.cac_ExternalReferenceUdid) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } }*(optheader_5 + 0) |= 0x01; } } { byte *storedPtr_5 = targetPtr; targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_AdditionalDocumentReferences!= null) { for(int iterator_5 = 0;iterator_5<envelope.content.claims.Value.cac_AdditionalDocumentReferences.Count;++iterator_5) { { byte* optheader_6 = targetPtr; *(optheader_6 + 0) = 0x00; targetPtr += 1; if(envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].ID!= null) { int strlen_7 = envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].ID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].ID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].DocumentType!= null) { int strlen_7 = envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].DocumentType.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].DocumentType) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].cac_Attachment!= null) { { if(envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].cac_Attachment.Value.cac_ExternalReferenceUdid!= null) { int strlen_8 = envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].cac_Attachment.Value.cac_ExternalReferenceUdid.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].cac_Attachment.Value.cac_ExternalReferenceUdid) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } }*(optheader_6 + 0) |= 0x01; } } } } *(int*)storedPtr_5 = (int)(targetPtr - storedPtr_5 - 4); } { if(envelope.content.claims.Value.cac_AccountingSupplierParty.cac_PartyUdid!= null) { int strlen_6 = envelope.content.claims.Value.cac_AccountingSupplierParty.cac_PartyUdid.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cac_AccountingSupplierParty.cac_PartyUdid) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } { if(envelope.content.claims.Value.cac_AccountingCustomerParty.cac_PartyUdid!= null) { int strlen_6 = envelope.content.claims.Value.cac_AccountingCustomerParty.cac_PartyUdid.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cac_AccountingCustomerParty.cac_PartyUdid) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } { if(envelope.content.claims.Value.cac_PayeeParty.cac_PartyUdid!= null) { int strlen_6 = envelope.content.claims.Value.cac_PayeeParty.cac_PartyUdid.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cac_PayeeParty.cac_PartyUdid) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } { { *(long*)targetPtr = envelope.content.claims.Value.cac_Delivery.cbc_ActualDeliveryDate.ToBinary(); targetPtr += 8; } { { byte* optheader_7 = targetPtr; *(optheader_7 + 0) = 0x00; targetPtr += 1; if(envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeID!= null) { int strlen_8 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeID.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeID) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeAgencyID!= null) { if(envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeAgencyID!= null) { int strlen_8 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeAgencyID.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeAgencyID) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_7 + 0) |= 0x01; } if(envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID.code!= null) { int strlen_8 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID.code.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID.code) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } if(envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cac_AddressUdid!= null) { int strlen_7 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cac_AddressUdid.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cac_AddressUdid) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } } if(envelope.content.claims.Value.cac_PaymentMeansUdid!= null) { int strlen_5 = envelope.content.claims.Value.cac_PaymentMeansUdid.Length * 2; *(int*)targetPtr = strlen_5; targetPtr += sizeof(int); fixed(char* pstr_5 = envelope.content.claims.Value.cac_PaymentMeansUdid) { Memory.Copy(pstr_5, targetPtr, strlen_5); targetPtr += strlen_5; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { { *(ISO639_1_LanguageCodes*)targetPtr = envelope.content.claims.Value.cac_PaymentTerms.cbc_Note._languageID; targetPtr += 1; if(envelope.content.claims.Value.cac_PaymentTerms.cbc_Note.note!= null) { int strlen_7 = envelope.content.claims.Value.cac_PaymentTerms.cbc_Note.note.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_PaymentTerms.cbc_Note.note) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } } { byte *storedPtr_5 = targetPtr; targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_AllowanceCharges!= null) { for(int iterator_5 = 0;iterator_5<envelope.content.claims.Value.cac_AllowanceCharges.Count;++iterator_5) { { *(bool*)targetPtr = envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_ChargeIndicator; targetPtr += 1; if(envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_AllowanceChargeReason!= null) { int strlen_7 = envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_AllowanceChargeReason.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_AllowanceChargeReason) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { if(envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_Amount._CurrencyID!= null) { int strlen_8 = envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_Amount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_Amount._CurrencyID) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_Amount.amount; targetPtr += 8; } } } } *(int*)storedPtr_5 = (int)(targetPtr - storedPtr_5 - 4); } { { if(envelope.content.claims.Value.cac_TaxTotal.cbc_TaxAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_TaxTotal.cbc_TaxAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_TaxTotal.cbc_TaxAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_TaxTotal.cbc_TaxAmount.amount; targetPtr += 8; } { byte *storedPtr_6 = targetPtr; targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals!= null) { for(int iterator_6 = 0;iterator_6<envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals.Count;++iterator_6) { { { if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxableAmount._CurrencyID!= null) { int strlen_9 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxableAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_9; targetPtr += sizeof(int); fixed(char* pstr_9 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxableAmount._CurrencyID) { Memory.Copy(pstr_9, targetPtr, strlen_9); targetPtr += strlen_9; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxableAmount.amount; targetPtr += 8; } { if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxAmount._CurrencyID!= null) { int strlen_9 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_9; targetPtr += sizeof(int); fixed(char* pstr_9 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxAmount._CurrencyID) { Memory.Copy(pstr_9, targetPtr, strlen_9); targetPtr += strlen_9; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxAmount.amount; targetPtr += 8; } { { byte* optheader_9 = targetPtr; *(optheader_9 + 0) = 0x00; targetPtr += 1; if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeID!= null) { int strlen_10 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeID.Length * 2; *(int*)targetPtr = strlen_10; targetPtr += sizeof(int); fixed(char* pstr_10 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeID) { Memory.Copy(pstr_10, targetPtr, strlen_10); targetPtr += strlen_10; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeAgencyID!= null) { if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeAgencyID!= null) { int strlen_10 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeAgencyID.Length * 2; *(int*)targetPtr = strlen_10; targetPtr += sizeof(int); fixed(char* pstr_10 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeAgencyID) { Memory.Copy(pstr_10, targetPtr, strlen_10); targetPtr += strlen_10; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_9 + 0) |= 0x01; } if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID.code!= null) { int strlen_10 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID.code.Length * 2; *(int*)targetPtr = strlen_10; targetPtr += sizeof(int); fixed(char* pstr_10 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID.code) { Memory.Copy(pstr_10, targetPtr, strlen_10); targetPtr += strlen_10; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } *(double*)targetPtr = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_Percent; targetPtr += 8; { { byte* optheader_10 = targetPtr; *(optheader_10 + 0) = 0x00; targetPtr += 1; if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID!= null) { int strlen_11 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID.Length * 2; *(int*)targetPtr = strlen_11; targetPtr += sizeof(int); fixed(char* pstr_11 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID) { Memory.Copy(pstr_11, targetPtr, strlen_11); targetPtr += strlen_11; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID!= null) { if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID!= null) { int strlen_11 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID.Length * 2; *(int*)targetPtr = strlen_11; targetPtr += sizeof(int); fixed(char* pstr_11 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID) { Memory.Copy(pstr_11, targetPtr, strlen_11); targetPtr += strlen_11; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_10 + 0) |= 0x01; } if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID.code!= null) { int strlen_11 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID.code.Length * 2; *(int*)targetPtr = strlen_11; targetPtr += sizeof(int); fixed(char* pstr_11 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID.code) { Memory.Copy(pstr_11, targetPtr, strlen_11); targetPtr += strlen_11; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } } } } } } *(int*)storedPtr_6 = (int)(targetPtr - storedPtr_6 - 4); } } { { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_LineExtensionAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_LineExtensionAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_LineExtensionAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_LineExtensionAmount.amount; targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxExclusiveAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxExclusiveAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxExclusiveAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxExclusiveAmount.amount; targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxInclusiveAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxInclusiveAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxInclusiveAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxInclusiveAmount.amount; targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_AllowanceTotalAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_AllowanceTotalAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_AllowanceTotalAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_AllowanceTotalAmount.amount; targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_ChargeTotalAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_ChargeTotalAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_ChargeTotalAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_ChargeTotalAmount.amount; targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PrepaidAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PrepaidAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PrepaidAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PrepaidAmount.amount; targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableRoundingAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableRoundingAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableRoundingAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableRoundingAmount.amount; targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableAmount.amount; targetPtr += 8; } } { byte *storedPtr_5 = targetPtr; targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_InvoiceLine!= null) { for(int iterator_5 = 0;iterator_5<envelope.content.claims.Value.cac_InvoiceLine.Count;++iterator_5) { { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_ID!= null) { int strlen_7 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_ID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_ID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { *(ISO639_1_LanguageCodes*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_Note._languageID; targetPtr += 1; if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_Note.note!= null) { int strlen_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_Note.note.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_Note.note) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_InvoicedQuantity._unitCode!= null) { int strlen_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_InvoicedQuantity._unitCode.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_InvoicedQuantity._unitCode) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(long*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_InvoicedQuantity.quantity; targetPtr += 8; } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_LineExtensionAmount._CurrencyID!= null) { int strlen_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_LineExtensionAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_LineExtensionAmount._CurrencyID) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_LineExtensionAmount.amount; targetPtr += 8; } if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_AccountingCost!= null) { int strlen_7 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_AccountingCost.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_AccountingCost) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_OrderLineReference.cbc_LineID!= null) { int strlen_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_OrderLineReference.cbc_LineID.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_OrderLineReference.cbc_LineID) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } { byte *storedPtr_7 = targetPtr; targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges!= null) { for(int iterator_7 = 0;iterator_7<envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges.Count;++iterator_7) { { *(bool*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_ChargeIndicator; targetPtr += 1; if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_AllowanceChargeReason!= null) { int strlen_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_AllowanceChargeReason.Length * 2; *(int*)targetPtr = strlen_9; targetPtr += sizeof(int); fixed(char* pstr_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_AllowanceChargeReason) { Memory.Copy(pstr_9, targetPtr, strlen_9); targetPtr += strlen_9; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_Amount._CurrencyID!= null) { int strlen_10 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_Amount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_10; targetPtr += sizeof(int); fixed(char* pstr_10 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_Amount._CurrencyID) { Memory.Copy(pstr_10, targetPtr, strlen_10); targetPtr += strlen_10; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_Amount.amount; targetPtr += 8; } } } } *(int*)storedPtr_7 = (int)(targetPtr - storedPtr_7 - 4); } { { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cbc_TaxAmount._CurrencyID!= null) { int strlen_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cbc_TaxAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_9; targetPtr += sizeof(int); fixed(char* pstr_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cbc_TaxAmount._CurrencyID) { Memory.Copy(pstr_9, targetPtr, strlen_9); targetPtr += strlen_9; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cbc_TaxAmount.amount; targetPtr += 8; } { byte *storedPtr_8 = targetPtr; targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals!= null) { for(int iterator_8 = 0;iterator_8<envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals.Count;++iterator_8) { { { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxableAmount._CurrencyID!= null) { int strlen_11 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxableAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_11; targetPtr += sizeof(int); fixed(char* pstr_11 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxableAmount._CurrencyID) { Memory.Copy(pstr_11, targetPtr, strlen_11); targetPtr += strlen_11; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxableAmount.amount; targetPtr += 8; } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxAmount._CurrencyID!= null) { int strlen_11 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_11; targetPtr += sizeof(int); fixed(char* pstr_11 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxAmount._CurrencyID) { Memory.Copy(pstr_11, targetPtr, strlen_11); targetPtr += strlen_11; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxAmount.amount; targetPtr += 8; } { { byte* optheader_11 = targetPtr; *(optheader_11 + 0) = 0x00; targetPtr += 1; if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeID!= null) { int strlen_12 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeID.Length * 2; *(int*)targetPtr = strlen_12; targetPtr += sizeof(int); fixed(char* pstr_12 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeID) { Memory.Copy(pstr_12, targetPtr, strlen_12); targetPtr += strlen_12; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeAgencyID!= null) { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeAgencyID!= null) { int strlen_12 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeAgencyID.Length * 2; *(int*)targetPtr = strlen_12; targetPtr += sizeof(int); fixed(char* pstr_12 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeAgencyID) { Memory.Copy(pstr_12, targetPtr, strlen_12); targetPtr += strlen_12; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_11 + 0) |= 0x01; } if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID.code!= null) { int strlen_12 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID.code.Length * 2; *(int*)targetPtr = strlen_12; targetPtr += sizeof(int); fixed(char* pstr_12 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID.code) { Memory.Copy(pstr_12, targetPtr, strlen_12); targetPtr += strlen_12; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } *(double*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_Percent; targetPtr += 8; { { byte* optheader_12 = targetPtr; *(optheader_12 + 0) = 0x00; targetPtr += 1; if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID!= null) { int strlen_13 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID.Length * 2; *(int*)targetPtr = strlen_13; targetPtr += sizeof(int); fixed(char* pstr_13 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID) { Memory.Copy(pstr_13, targetPtr, strlen_13); targetPtr += strlen_13; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID!= null) { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID!= null) { int strlen_13 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID.Length * 2; *(int*)targetPtr = strlen_13; targetPtr += sizeof(int); fixed(char* pstr_13 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID) { Memory.Copy(pstr_13, targetPtr, strlen_13); targetPtr += strlen_13; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_12 + 0) |= 0x01; } if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID.code!= null) { int strlen_13 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID.code.Length * 2; *(int*)targetPtr = strlen_13; targetPtr += sizeof(int); fixed(char* pstr_13 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID.code) { Memory.Copy(pstr_13, targetPtr, strlen_13); targetPtr += strlen_13; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } } } } } } *(int*)storedPtr_8 = (int)(targetPtr - storedPtr_8 - 4); } } if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_ItemUdid!= null) { int strlen_7 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_ItemUdid.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_ItemUdid) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_PriceAmount._CurrencyID!= null) { int strlen_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_PriceAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_9; targetPtr += sizeof(int); fixed(char* pstr_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_PriceAmount._CurrencyID) { Memory.Copy(pstr_9, targetPtr, strlen_9); targetPtr += strlen_9; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_PriceAmount.amount; targetPtr += 8; } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_BaseQuantity._unitCode!= null) { int strlen_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_BaseQuantity._unitCode.Length * 2; *(int*)targetPtr = strlen_9; targetPtr += sizeof(int); fixed(char* pstr_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_BaseQuantity._unitCode) { Memory.Copy(pstr_9, targetPtr, strlen_9); targetPtr += strlen_9; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(long*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_BaseQuantity.quantity; targetPtr += 8; } { *(bool*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_ChargeIndicator; targetPtr += 1; if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_AllowanceChargeReason!= null) { int strlen_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_AllowanceChargeReason.Length * 2; *(int*)targetPtr = strlen_9; targetPtr += sizeof(int); fixed(char* pstr_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_AllowanceChargeReason) { Memory.Copy(pstr_9, targetPtr, strlen_9); targetPtr += strlen_9; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_Amount._CurrencyID!= null) { int strlen_10 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_Amount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_10; targetPtr += sizeof(int); fixed(char* pstr_10 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_Amount._CurrencyID) { Memory.Copy(pstr_10, targetPtr, strlen_10); targetPtr += strlen_10; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_Amount.amount; targetPtr += 8; } } } } } } *(int*)storedPtr_5 = (int)(targetPtr - storedPtr_5 - 4); } }*(optheader_3 + 0) |= 0x02; } if( envelope.content.encryptedclaims!= null) { { if(envelope.content.encryptedclaims.Value.ciphertext16!= null) { int strlen_5 = envelope.content.encryptedclaims.Value.ciphertext16.Length * 2; *(int*)targetPtr = strlen_5; targetPtr += sizeof(int); fixed(char* pstr_5 = envelope.content.encryptedclaims.Value.ciphertext16) { Memory.Copy(pstr_5, targetPtr, strlen_5); targetPtr += strlen_5; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(envelope.content.encryptedclaims.Value.alg!= null) { int strlen_5 = envelope.content.encryptedclaims.Value.alg.Length * 2; *(int*)targetPtr = strlen_5; targetPtr += sizeof(int); fixed(char* pstr_5 = envelope.content.encryptedclaims.Value.alg) { Memory.Copy(pstr_5, targetPtr, strlen_5); targetPtr += strlen_5; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(envelope.content.encryptedclaims.Value.key!= null) { int strlen_5 = envelope.content.encryptedclaims.Value.key.Length * 2; *(int*)targetPtr = strlen_5; targetPtr += sizeof(int); fixed(char* pstr_5 = envelope.content.encryptedclaims.Value.key) { Memory.Copy(pstr_5, targetPtr, strlen_5); targetPtr += strlen_5; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } }*(optheader_3 + 0) |= 0x04; } } { byte* optheader_3 = targetPtr; *(optheader_3 + 0) = 0x00; targetPtr += 1; *(TRACredentialType*)targetPtr = envelope.label.credtype; targetPtr += 1; *(long*)targetPtr = envelope.label.version; targetPtr += 8; *(TRATrustLevel*)targetPtr = envelope.label.trustLevel; targetPtr += 1; *(TRAEncryptionFlag*)targetPtr = envelope.label.encryptionFlag; targetPtr += 1; if(envelope.label.notaryudid!= null) { int strlen_4 = envelope.label.notaryudid.Length * 2; *(int*)targetPtr = strlen_4; targetPtr += sizeof(int); fixed(char* pstr_4 = envelope.label.notaryudid) { Memory.Copy(pstr_4, targetPtr, strlen_4); targetPtr += strlen_4; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if( envelope.label.name!= null) { if(envelope.label.name!= null) { int strlen_4 = envelope.label.name.Length * 2; *(int*)targetPtr = strlen_4; targetPtr += sizeof(int); fixed(char* pstr_4 = envelope.label.name) { Memory.Copy(pstr_4, targetPtr, strlen_4); targetPtr += strlen_4; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_3 + 0) |= 0x01; } if( envelope.label.comment!= null) { if(envelope.label.comment!= null) { int strlen_4 = envelope.label.comment.Length * 2; *(int*)targetPtr = strlen_4; targetPtr += sizeof(int); fixed(char* pstr_4 = envelope.label.comment) { Memory.Copy(pstr_4, targetPtr, strlen_4); targetPtr += strlen_4; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_3 + 0) |= 0x02; } } } { byte* optheader_2 = targetPtr; *(optheader_2 + 0) = 0x00; targetPtr += 1; if( envelopeseal.hashedThumbprint64!= null) { if(envelopeseal.hashedThumbprint64!= null) { int strlen_3 = envelopeseal.hashedThumbprint64.Length * 2; *(int*)targetPtr = strlen_3; targetPtr += sizeof(int); fixed(char* pstr_3 = envelopeseal.hashedThumbprint64) { Memory.Copy(pstr_3, targetPtr, strlen_3); targetPtr += strlen_3; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_2 + 0) |= 0x01; } if( envelopeseal.signedHashSignature64!= null) { if(envelopeseal.signedHashSignature64!= null) { int strlen_3 = envelopeseal.signedHashSignature64.Length * 2; *(int*)targetPtr = strlen_3; targetPtr += sizeof(int); fixed(char* pstr_3 = envelopeseal.signedHashSignature64) { Memory.Copy(pstr_3, targetPtr, strlen_3); targetPtr += strlen_3; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_2 + 0) |= 0x02; } if( envelopeseal.notaryStamp!= null) { if(envelopeseal.notaryStamp!= null) { int strlen_3 = envelopeseal.notaryStamp.Length * 2; *(int*)targetPtr = strlen_3; targetPtr += sizeof(int); fixed(char* pstr_3 = envelopeseal.notaryStamp) { Memory.Copy(pstr_3, targetPtr, strlen_3); targetPtr += strlen_3; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_2 + 0) |= 0x04; } if( envelopeseal.comments!= null) { { byte *storedPtr_3 = targetPtr; targetPtr += sizeof(int); if(envelopeseal.comments!= null) { for(int iterator_3 = 0;iterator_3<envelopeseal.comments.Count;++iterator_3) { if(envelopeseal.comments[iterator_3]!= null) { int strlen_4 = envelopeseal.comments[iterator_3].Length * 2; *(int*)targetPtr = strlen_4; targetPtr += sizeof(int); fixed(char* pstr_4 = envelopeseal.comments[iterator_3]) { Memory.Copy(pstr_4, targetPtr, strlen_4); targetPtr += strlen_4; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } } *(int*)storedPtr_3 = (int)(targetPtr - storedPtr_3 - 4); } *(optheader_2 + 0) |= 0x08; } } } } return storage.SaveCell(options, cellId, tmpcell, 0, tmpcell.Length, (ushort)CellType.UBL21_Invoice2_Cell) == TrinityErrorCode.E_SUCCESS; } /// <summary> /// Adds a new cell of type UBL21_Invoice2_Cell to the key-value store if the cell Id does not exist, or updates an existing cell in the key-value store if the cell Id already exists. The parameter <paramref name="cellId"/> overrides the cell id in the content object. /// </summary> /// <param name="storage"/>A <see cref="Trinity.Storage.LocalMemoryStorage"/> instance.</param> /// <param name="cellId">A 64-bit cell Id.</param> /// <param name="options">Specifies write-ahead logging behavior. Valid values are CellAccessOptions.StrongLogAhead(default) and CellAccessOptions.WeakLogAhead. Other values are ignored.</param> /// <param name="cellContent">The content of the cell.</param> /// <returns>true if saving succeeds; otherwise, false.</returns> public unsafe static bool SaveUBL21_Invoice2_Cell(this Trinity.Storage.LocalMemoryStorage storage, CellAccessOptions options, long cellId, UBL21_Invoice2_Cell cellContent) { return SaveUBL21_Invoice2_Cell(storage, options, cellId , cellContent.envelope , cellContent.envelopeseal ); } /// <summary> /// Adds a new cell of type UBL21_Invoice2_Cell to the key-value store if the cell Id does not exist, or updates an existing cell in the key-value store if the cell Id already exists. Cell Id is specified by the CellId field in the content object. /// </summary> /// <param name="storage"/>A <see cref="Trinity.Storage.LocalMemoryStorage"/> instance.</param> /// <param name="options">Specifies write-ahead logging behavior. Valid values are CellAccessOptions.StrongLogAhead(default) and CellAccessOptions.WeakLogAhead. Other values are ignored.</param> /// <param name="cellContent">The content of the cell.</param> /// <returns>true if saving succeeds; otherwise, false.</returns> public unsafe static bool SaveUBL21_Invoice2_Cell(this Trinity.Storage.LocalMemoryStorage storage, CellAccessOptions options, UBL21_Invoice2_Cell cellContent) { return SaveUBL21_Invoice2_Cell(storage, options, cellContent.CellId , cellContent.envelope , cellContent.envelopeseal ); } /// <summary> /// Loads the content of the specified cell. Any changes done to this object are not written to the store, unless /// the content object is saved back into the storage. /// <param name="storage"/>A <see cref="Trinity.Storage.LocalMemoryStorage"/> instance.</param> /// </summary> public unsafe static UBL21_Invoice2_Cell LoadUBL21_Invoice2_Cell(this Trinity.Storage.LocalMemoryStorage storage, long cellId) { using (var cell = UBL21_Invoice2_Cell_Accessor._get()._Lock(cellId, CellAccessOptions.ThrowExceptionOnCellNotFound)) { return cell; } } #endregion #region LocalMemoryStorage Tx accessors /// <summary> /// Allocate a cell accessor on the specified cell, which interprets /// the cell as a UBL21_Invoice2_Cell. Any changes done to the accessor /// are written to the storage immediately. /// If <c><see cref="Trinity.TrinityConfig.ReadOnly"/> == false</c>, /// on calling this method, it attempts to acquire the lock of the cell, /// and blocks until it gets the lock. Otherwise this method is wait-free. /// </summary> /// <param name="storage">A <see cref="Trinity.Storage.LocalMemoryStorage"/> instance.</param> /// <param name="cellId">The id of the specified cell.</param> /// <param name="options">Specifies write-ahead logging behavior. Valid values are CellAccessOptions.StrongLogAhead(default) and CellAccessOptions.WeakLogAhead. Other values are ignored.</param> /// <returns>A <see cref="TDW.TRAServer.UBL21_Invoice2_Cell"/> instance.</returns> public unsafe static UBL21_Invoice2_Cell_Accessor UseUBL21_Invoice2_Cell(this Trinity.Storage.LocalMemoryStorage storage, LocalTransactionContext tx, long cellId, CellAccessOptions options) { return UBL21_Invoice2_Cell_Accessor._get()._Lock(cellId, options, tx); } /// <summary> /// Allocate a cell accessor on the specified cell, which interprets /// the cell as a UBL21_Invoice2_Cell. Any changes done to the accessor /// are written to the storage immediately. /// If <c><see cref="Trinity.TrinityConfig.ReadOnly"/> == false</c>, /// on calling this method, it attempts to acquire the lock of the cell, /// and blocks until it gets the lock. /// </summary> /// <param name="storage">A <see cref="Trinity.Storage.LocalMemoryStorage"/> instance.</param> /// <param name="cellId">The id of the specified cell.</param> /// <returns>A <see cref="" + script.RootNamespace + ".UBL21_Invoice2_Cell"/> instance.</returns> public unsafe static UBL21_Invoice2_Cell_Accessor UseUBL21_Invoice2_Cell(this Trinity.Storage.LocalMemoryStorage storage, LocalTransactionContext tx, long cellId) { return UBL21_Invoice2_Cell_Accessor._get()._Lock(cellId, CellAccessOptions.ThrowExceptionOnCellNotFound, tx); } #endregion #region LocalStorage Tx logging /// <summary> /// Adds a new cell of type UBL21_Invoice2_Cell to the key-value store if the cell Id does not exist, or updates an existing cell in the key-value store if the cell Id already exists. The value of the cell is specified in the method parameters. /// </summary> /// <param name="storage"/>A <see cref="Trinity.Storage.LocalMemoryStorage"/> instance.</param> /// <param name="cellId">A 64-bit cell Id.</param> /// <param name="options">Specifies write-ahead logging behavior. Valid values are CellAccessOptions.StrongLogAhead(default) and CellAccessOptions.WeakLogAhead. Other values are ignored.</param> /// <returns>true if saving succeeds; otherwise, false.</returns> public unsafe static bool SaveUBL21_Invoice2_Cell(this Trinity.Storage.LocalMemoryStorage storage, LocalTransactionContext tx, CellAccessOptions options, long cellId, UBL21_Invoice2_Envelope envelope = default(UBL21_Invoice2_Envelope), TRACredential_EnvelopeSeal envelopeseal = default(TRACredential_EnvelopeSeal)) { byte* targetPtr; targetPtr = null; { { { targetPtr += 1; if(envelope.content.udid!= null) { int strlen_4 = envelope.content.udid.Length * 2; targetPtr += strlen_4+sizeof(int); }else { targetPtr += sizeof(int); } { targetPtr += sizeof(int); if(envelope.content.context!= null) { for(int iterator_4 = 0;iterator_4<envelope.content.context.Count;++iterator_4) { if(envelope.content.context[iterator_4]!= null) { int strlen_5 = envelope.content.context[iterator_4].Length * 2; targetPtr += strlen_5+sizeof(int); }else { targetPtr += sizeof(int); } } } } if( envelope.content.credentialsubjectudid!= null) { if(envelope.content.credentialsubjectudid!= null) { int strlen_4 = envelope.content.credentialsubjectudid.Length * 2; targetPtr += strlen_4+sizeof(int); }else { targetPtr += sizeof(int); } } if( envelope.content.claims!= null) { { if(envelope.content.claims.Value.cbc_UBLVersionID!= null) { int strlen_5 = envelope.content.claims.Value.cbc_UBLVersionID.Length * 2; targetPtr += strlen_5+sizeof(int); }else { targetPtr += sizeof(int); } if(envelope.content.claims.Value.cbc_ID!= null) { int strlen_5 = envelope.content.claims.Value.cbc_ID.Length * 2; targetPtr += strlen_5+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; { if(envelope.content.claims.Value.cbc_InvoiceTypeCode._listID!= null) { int strlen_6 = envelope.content.claims.Value.cbc_InvoiceTypeCode._listID.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } if(envelope.content.claims.Value.cbc_InvoiceTypeCode._listAgencyID!= null) { int strlen_6 = envelope.content.claims.Value.cbc_InvoiceTypeCode._listAgencyID.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } if(envelope.content.claims.Value.cbc_InvoiceTypeCode.code!= null) { int strlen_6 = envelope.content.claims.Value.cbc_InvoiceTypeCode.code.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } } { targetPtr += 1; if(envelope.content.claims.Value.cbc_Note.note!= null) { int strlen_6 = envelope.content.claims.Value.cbc_Note.note.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } }targetPtr += 8; { if(envelope.content.claims.Value.cbc_DocumentCurrencyCode._listID!= null) { int strlen_6 = envelope.content.claims.Value.cbc_DocumentCurrencyCode._listID.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } if(envelope.content.claims.Value.cbc_DocumentCurrencyCode._listAgencyID!= null) { int strlen_6 = envelope.content.claims.Value.cbc_DocumentCurrencyCode._listAgencyID.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } if(envelope.content.claims.Value.cbc_DocumentCurrencyCode.code!= null) { int strlen_6 = envelope.content.claims.Value.cbc_DocumentCurrencyCode.code.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } } if(envelope.content.claims.Value.cbc_AccountingCost!= null) { int strlen_5 = envelope.content.claims.Value.cbc_AccountingCost.Length * 2; targetPtr += strlen_5+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 16; { if(envelope.content.claims.Value.cbc_OrderReference.cbc_ID!= null) { int strlen_6 = envelope.content.claims.Value.cbc_OrderReference.cbc_ID.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } } { targetPtr += 1; if(envelope.content.claims.Value.cac_ContractDocumentReference.ID!= null) { int strlen_6 = envelope.content.claims.Value.cac_ContractDocumentReference.ID.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } if(envelope.content.claims.Value.cac_ContractDocumentReference.DocumentType!= null) { int strlen_6 = envelope.content.claims.Value.cac_ContractDocumentReference.DocumentType.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_ContractDocumentReference.cac_Attachment!= null) { { if(envelope.content.claims.Value.cac_ContractDocumentReference.cac_Attachment.Value.cac_ExternalReferenceUdid!= null) { int strlen_7 = envelope.content.claims.Value.cac_ContractDocumentReference.cac_Attachment.Value.cac_ExternalReferenceUdid.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } } } } { targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_AdditionalDocumentReferences!= null) { for(int iterator_5 = 0;iterator_5<envelope.content.claims.Value.cac_AdditionalDocumentReferences.Count;++iterator_5) { { targetPtr += 1; if(envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].ID!= null) { int strlen_7 = envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].ID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } if(envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].DocumentType!= null) { int strlen_7 = envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].DocumentType.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].cac_Attachment!= null) { { if(envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].cac_Attachment.Value.cac_ExternalReferenceUdid!= null) { int strlen_8 = envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].cac_Attachment.Value.cac_ExternalReferenceUdid.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } } } } } } } { if(envelope.content.claims.Value.cac_AccountingSupplierParty.cac_PartyUdid!= null) { int strlen_6 = envelope.content.claims.Value.cac_AccountingSupplierParty.cac_PartyUdid.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } } { if(envelope.content.claims.Value.cac_AccountingCustomerParty.cac_PartyUdid!= null) { int strlen_6 = envelope.content.claims.Value.cac_AccountingCustomerParty.cac_PartyUdid.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } } { if(envelope.content.claims.Value.cac_PayeeParty.cac_PartyUdid!= null) { int strlen_6 = envelope.content.claims.Value.cac_PayeeParty.cac_PartyUdid.Length * 2; targetPtr += strlen_6+sizeof(int); }else { targetPtr += sizeof(int); } } { targetPtr += 8; { { targetPtr += 1; if(envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeID!= null) { int strlen_8 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeID.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeAgencyID!= null) { if(envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeAgencyID!= null) { int strlen_8 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeAgencyID.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } } if(envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID.code!= null) { int strlen_8 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID.code.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } } if(envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cac_AddressUdid!= null) { int strlen_7 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cac_AddressUdid.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } } } if(envelope.content.claims.Value.cac_PaymentMeansUdid!= null) { int strlen_5 = envelope.content.claims.Value.cac_PaymentMeansUdid.Length * 2; targetPtr += strlen_5+sizeof(int); }else { targetPtr += sizeof(int); } { { targetPtr += 1; if(envelope.content.claims.Value.cac_PaymentTerms.cbc_Note.note!= null) { int strlen_7 = envelope.content.claims.Value.cac_PaymentTerms.cbc_Note.note.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } } } { targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_AllowanceCharges!= null) { for(int iterator_5 = 0;iterator_5<envelope.content.claims.Value.cac_AllowanceCharges.Count;++iterator_5) { { targetPtr += 1; if(envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_AllowanceChargeReason!= null) { int strlen_7 = envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_AllowanceChargeReason.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } { if(envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_Amount._CurrencyID!= null) { int strlen_8 = envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_Amount._CurrencyID.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } } } } } { { if(envelope.content.claims.Value.cac_TaxTotal.cbc_TaxAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_TaxTotal.cbc_TaxAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals!= null) { for(int iterator_6 = 0;iterator_6<envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals.Count;++iterator_6) { { { if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxableAmount._CurrencyID!= null) { int strlen_9 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxableAmount._CurrencyID.Length * 2; targetPtr += strlen_9+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxAmount._CurrencyID!= null) { int strlen_9 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxAmount._CurrencyID.Length * 2; targetPtr += strlen_9+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { { targetPtr += 1; if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeID!= null) { int strlen_10 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeID.Length * 2; targetPtr += strlen_10+sizeof(int); }else { targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeAgencyID!= null) { if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeAgencyID!= null) { int strlen_10 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeAgencyID.Length * 2; targetPtr += strlen_10+sizeof(int); }else { targetPtr += sizeof(int); } } if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID.code!= null) { int strlen_10 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID.code.Length * 2; targetPtr += strlen_10+sizeof(int); }else { targetPtr += sizeof(int); } } targetPtr += 8; { { targetPtr += 1; if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID!= null) { int strlen_11 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID.Length * 2; targetPtr += strlen_11+sizeof(int); }else { targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID!= null) { if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID!= null) { int strlen_11 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID.Length * 2; targetPtr += strlen_11+sizeof(int); }else { targetPtr += sizeof(int); } } if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID.code!= null) { int strlen_11 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID.code.Length * 2; targetPtr += strlen_11+sizeof(int); }else { targetPtr += sizeof(int); } } } } } } } } } { { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_LineExtensionAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_LineExtensionAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxExclusiveAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxExclusiveAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxInclusiveAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxInclusiveAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_AllowanceTotalAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_AllowanceTotalAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_ChargeTotalAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_ChargeTotalAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PrepaidAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PrepaidAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableRoundingAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableRoundingAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableAmount._CurrencyID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } } { targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_InvoiceLine!= null) { for(int iterator_5 = 0;iterator_5<envelope.content.claims.Value.cac_InvoiceLine.Count;++iterator_5) { { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_ID!= null) { int strlen_7 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_ID.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } { targetPtr += 1; if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_Note.note!= null) { int strlen_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_Note.note.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_InvoicedQuantity._unitCode!= null) { int strlen_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_InvoicedQuantity._unitCode.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_LineExtensionAmount._CurrencyID!= null) { int strlen_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_LineExtensionAmount._CurrencyID.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_AccountingCost!= null) { int strlen_7 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_AccountingCost.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_OrderLineReference.cbc_LineID!= null) { int strlen_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_OrderLineReference.cbc_LineID.Length * 2; targetPtr += strlen_8+sizeof(int); }else { targetPtr += sizeof(int); } } { targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges!= null) { for(int iterator_7 = 0;iterator_7<envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges.Count;++iterator_7) { { targetPtr += 1; if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_AllowanceChargeReason!= null) { int strlen_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_AllowanceChargeReason.Length * 2; targetPtr += strlen_9+sizeof(int); }else { targetPtr += sizeof(int); } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_Amount._CurrencyID!= null) { int strlen_10 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_Amount._CurrencyID.Length * 2; targetPtr += strlen_10+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } } } } } { { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cbc_TaxAmount._CurrencyID!= null) { int strlen_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cbc_TaxAmount._CurrencyID.Length * 2; targetPtr += strlen_9+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals!= null) { for(int iterator_8 = 0;iterator_8<envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals.Count;++iterator_8) { { { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxableAmount._CurrencyID!= null) { int strlen_11 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxableAmount._CurrencyID.Length * 2; targetPtr += strlen_11+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxAmount._CurrencyID!= null) { int strlen_11 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxAmount._CurrencyID.Length * 2; targetPtr += strlen_11+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { { targetPtr += 1; if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeID!= null) { int strlen_12 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeID.Length * 2; targetPtr += strlen_12+sizeof(int); }else { targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeAgencyID!= null) { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeAgencyID!= null) { int strlen_12 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeAgencyID.Length * 2; targetPtr += strlen_12+sizeof(int); }else { targetPtr += sizeof(int); } } if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID.code!= null) { int strlen_12 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID.code.Length * 2; targetPtr += strlen_12+sizeof(int); }else { targetPtr += sizeof(int); } } targetPtr += 8; { { targetPtr += 1; if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID!= null) { int strlen_13 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID.Length * 2; targetPtr += strlen_13+sizeof(int); }else { targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID!= null) { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID!= null) { int strlen_13 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID.Length * 2; targetPtr += strlen_13+sizeof(int); }else { targetPtr += sizeof(int); } } if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID.code!= null) { int strlen_13 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID.code.Length * 2; targetPtr += strlen_13+sizeof(int); }else { targetPtr += sizeof(int); } } } } } } } } } if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_ItemUdid!= null) { int strlen_7 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_ItemUdid.Length * 2; targetPtr += strlen_7+sizeof(int); }else { targetPtr += sizeof(int); } { { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_PriceAmount._CurrencyID!= null) { int strlen_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_PriceAmount._CurrencyID.Length * 2; targetPtr += strlen_9+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_BaseQuantity._unitCode!= null) { int strlen_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_BaseQuantity._unitCode.Length * 2; targetPtr += strlen_9+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } { targetPtr += 1; if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_AllowanceChargeReason!= null) { int strlen_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_AllowanceChargeReason.Length * 2; targetPtr += strlen_9+sizeof(int); }else { targetPtr += sizeof(int); } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_Amount._CurrencyID!= null) { int strlen_10 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_Amount._CurrencyID.Length * 2; targetPtr += strlen_10+sizeof(int); }else { targetPtr += sizeof(int); } targetPtr += 8; } } } } } } } } } if( envelope.content.encryptedclaims!= null) { { if(envelope.content.encryptedclaims.Value.ciphertext16!= null) { int strlen_5 = envelope.content.encryptedclaims.Value.ciphertext16.Length * 2; targetPtr += strlen_5+sizeof(int); }else { targetPtr += sizeof(int); } if(envelope.content.encryptedclaims.Value.alg!= null) { int strlen_5 = envelope.content.encryptedclaims.Value.alg.Length * 2; targetPtr += strlen_5+sizeof(int); }else { targetPtr += sizeof(int); } if(envelope.content.encryptedclaims.Value.key!= null) { int strlen_5 = envelope.content.encryptedclaims.Value.key.Length * 2; targetPtr += strlen_5+sizeof(int); }else { targetPtr += sizeof(int); } } } } { targetPtr += 1; targetPtr += 1; targetPtr += 8; targetPtr += 1; targetPtr += 1; if(envelope.label.notaryudid!= null) { int strlen_4 = envelope.label.notaryudid.Length * 2; targetPtr += strlen_4+sizeof(int); }else { targetPtr += sizeof(int); } if( envelope.label.name!= null) { if(envelope.label.name!= null) { int strlen_4 = envelope.label.name.Length * 2; targetPtr += strlen_4+sizeof(int); }else { targetPtr += sizeof(int); } } if( envelope.label.comment!= null) { if(envelope.label.comment!= null) { int strlen_4 = envelope.label.comment.Length * 2; targetPtr += strlen_4+sizeof(int); }else { targetPtr += sizeof(int); } } } } { targetPtr += 1; if( envelopeseal.hashedThumbprint64!= null) { if(envelopeseal.hashedThumbprint64!= null) { int strlen_3 = envelopeseal.hashedThumbprint64.Length * 2; targetPtr += strlen_3+sizeof(int); }else { targetPtr += sizeof(int); } } if( envelopeseal.signedHashSignature64!= null) { if(envelopeseal.signedHashSignature64!= null) { int strlen_3 = envelopeseal.signedHashSignature64.Length * 2; targetPtr += strlen_3+sizeof(int); }else { targetPtr += sizeof(int); } } if( envelopeseal.notaryStamp!= null) { if(envelopeseal.notaryStamp!= null) { int strlen_3 = envelopeseal.notaryStamp.Length * 2; targetPtr += strlen_3+sizeof(int); }else { targetPtr += sizeof(int); } } if( envelopeseal.comments!= null) { { targetPtr += sizeof(int); if(envelopeseal.comments!= null) { for(int iterator_3 = 0;iterator_3<envelopeseal.comments.Count;++iterator_3) { if(envelopeseal.comments[iterator_3]!= null) { int strlen_4 = envelopeseal.comments[iterator_3].Length * 2; targetPtr += strlen_4+sizeof(int); }else { targetPtr += sizeof(int); } } } } } } } byte[] tmpcell = new byte[(int)(targetPtr)]; fixed (byte* _tmpcellptr = tmpcell) { targetPtr = _tmpcellptr; { { { byte* optheader_3 = targetPtr; *(optheader_3 + 0) = 0x00; targetPtr += 1; if(envelope.content.udid!= null) { int strlen_4 = envelope.content.udid.Length * 2; *(int*)targetPtr = strlen_4; targetPtr += sizeof(int); fixed(char* pstr_4 = envelope.content.udid) { Memory.Copy(pstr_4, targetPtr, strlen_4); targetPtr += strlen_4; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { byte *storedPtr_4 = targetPtr; targetPtr += sizeof(int); if(envelope.content.context!= null) { for(int iterator_4 = 0;iterator_4<envelope.content.context.Count;++iterator_4) { if(envelope.content.context[iterator_4]!= null) { int strlen_5 = envelope.content.context[iterator_4].Length * 2; *(int*)targetPtr = strlen_5; targetPtr += sizeof(int); fixed(char* pstr_5 = envelope.content.context[iterator_4]) { Memory.Copy(pstr_5, targetPtr, strlen_5); targetPtr += strlen_5; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } } *(int*)storedPtr_4 = (int)(targetPtr - storedPtr_4 - 4); } if( envelope.content.credentialsubjectudid!= null) { if(envelope.content.credentialsubjectudid!= null) { int strlen_4 = envelope.content.credentialsubjectudid.Length * 2; *(int*)targetPtr = strlen_4; targetPtr += sizeof(int); fixed(char* pstr_4 = envelope.content.credentialsubjectudid) { Memory.Copy(pstr_4, targetPtr, strlen_4); targetPtr += strlen_4; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_3 + 0) |= 0x01; } if( envelope.content.claims!= null) { { if(envelope.content.claims.Value.cbc_UBLVersionID!= null) { int strlen_5 = envelope.content.claims.Value.cbc_UBLVersionID.Length * 2; *(int*)targetPtr = strlen_5; targetPtr += sizeof(int); fixed(char* pstr_5 = envelope.content.claims.Value.cbc_UBLVersionID) { Memory.Copy(pstr_5, targetPtr, strlen_5); targetPtr += strlen_5; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(envelope.content.claims.Value.cbc_ID!= null) { int strlen_5 = envelope.content.claims.Value.cbc_ID.Length * 2; *(int*)targetPtr = strlen_5; targetPtr += sizeof(int); fixed(char* pstr_5 = envelope.content.claims.Value.cbc_ID) { Memory.Copy(pstr_5, targetPtr, strlen_5); targetPtr += strlen_5; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { *(long*)targetPtr = envelope.content.claims.Value.cbc_IssueDate.ToBinary(); targetPtr += 8; } { if(envelope.content.claims.Value.cbc_InvoiceTypeCode._listID!= null) { int strlen_6 = envelope.content.claims.Value.cbc_InvoiceTypeCode._listID.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cbc_InvoiceTypeCode._listID) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(envelope.content.claims.Value.cbc_InvoiceTypeCode._listAgencyID!= null) { int strlen_6 = envelope.content.claims.Value.cbc_InvoiceTypeCode._listAgencyID.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cbc_InvoiceTypeCode._listAgencyID) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(envelope.content.claims.Value.cbc_InvoiceTypeCode.code!= null) { int strlen_6 = envelope.content.claims.Value.cbc_InvoiceTypeCode.code.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cbc_InvoiceTypeCode.code) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } { *(ISO639_1_LanguageCodes*)targetPtr = envelope.content.claims.Value.cbc_Note._languageID; targetPtr += 1; if(envelope.content.claims.Value.cbc_Note.note!= null) { int strlen_6 = envelope.content.claims.Value.cbc_Note.note.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cbc_Note.note) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } { *(long*)targetPtr = envelope.content.claims.Value.cbc_TaxPointDate.ToBinary(); targetPtr += 8; } { if(envelope.content.claims.Value.cbc_DocumentCurrencyCode._listID!= null) { int strlen_6 = envelope.content.claims.Value.cbc_DocumentCurrencyCode._listID.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cbc_DocumentCurrencyCode._listID) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(envelope.content.claims.Value.cbc_DocumentCurrencyCode._listAgencyID!= null) { int strlen_6 = envelope.content.claims.Value.cbc_DocumentCurrencyCode._listAgencyID.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cbc_DocumentCurrencyCode._listAgencyID) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(envelope.content.claims.Value.cbc_DocumentCurrencyCode.code!= null) { int strlen_6 = envelope.content.claims.Value.cbc_DocumentCurrencyCode.code.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cbc_DocumentCurrencyCode.code) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } if(envelope.content.claims.Value.cbc_AccountingCost!= null) { int strlen_5 = envelope.content.claims.Value.cbc_AccountingCost.Length * 2; *(int*)targetPtr = strlen_5; targetPtr += sizeof(int); fixed(char* pstr_5 = envelope.content.claims.Value.cbc_AccountingCost) { Memory.Copy(pstr_5, targetPtr, strlen_5); targetPtr += strlen_5; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { { *(long*)targetPtr = envelope.content.claims.Value.cbc_InvoicePeriod.cbc_StartDate.ToBinary(); targetPtr += 8; } { *(long*)targetPtr = envelope.content.claims.Value.cbc_InvoicePeriod.cbc_EndDate.ToBinary(); targetPtr += 8; } } { if(envelope.content.claims.Value.cbc_OrderReference.cbc_ID!= null) { int strlen_6 = envelope.content.claims.Value.cbc_OrderReference.cbc_ID.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cbc_OrderReference.cbc_ID) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } { byte* optheader_5 = targetPtr; *(optheader_5 + 0) = 0x00; targetPtr += 1; if(envelope.content.claims.Value.cac_ContractDocumentReference.ID!= null) { int strlen_6 = envelope.content.claims.Value.cac_ContractDocumentReference.ID.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cac_ContractDocumentReference.ID) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(envelope.content.claims.Value.cac_ContractDocumentReference.DocumentType!= null) { int strlen_6 = envelope.content.claims.Value.cac_ContractDocumentReference.DocumentType.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cac_ContractDocumentReference.DocumentType) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_ContractDocumentReference.cac_Attachment!= null) { { if(envelope.content.claims.Value.cac_ContractDocumentReference.cac_Attachment.Value.cac_ExternalReferenceUdid!= null) { int strlen_7 = envelope.content.claims.Value.cac_ContractDocumentReference.cac_Attachment.Value.cac_ExternalReferenceUdid.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_ContractDocumentReference.cac_Attachment.Value.cac_ExternalReferenceUdid) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } }*(optheader_5 + 0) |= 0x01; } } { byte *storedPtr_5 = targetPtr; targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_AdditionalDocumentReferences!= null) { for(int iterator_5 = 0;iterator_5<envelope.content.claims.Value.cac_AdditionalDocumentReferences.Count;++iterator_5) { { byte* optheader_6 = targetPtr; *(optheader_6 + 0) = 0x00; targetPtr += 1; if(envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].ID!= null) { int strlen_7 = envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].ID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].ID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].DocumentType!= null) { int strlen_7 = envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].DocumentType.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].DocumentType) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].cac_Attachment!= null) { { if(envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].cac_Attachment.Value.cac_ExternalReferenceUdid!= null) { int strlen_8 = envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].cac_Attachment.Value.cac_ExternalReferenceUdid.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = envelope.content.claims.Value.cac_AdditionalDocumentReferences[iterator_5].cac_Attachment.Value.cac_ExternalReferenceUdid) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } }*(optheader_6 + 0) |= 0x01; } } } } *(int*)storedPtr_5 = (int)(targetPtr - storedPtr_5 - 4); } { if(envelope.content.claims.Value.cac_AccountingSupplierParty.cac_PartyUdid!= null) { int strlen_6 = envelope.content.claims.Value.cac_AccountingSupplierParty.cac_PartyUdid.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cac_AccountingSupplierParty.cac_PartyUdid) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } { if(envelope.content.claims.Value.cac_AccountingCustomerParty.cac_PartyUdid!= null) { int strlen_6 = envelope.content.claims.Value.cac_AccountingCustomerParty.cac_PartyUdid.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cac_AccountingCustomerParty.cac_PartyUdid) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } { if(envelope.content.claims.Value.cac_PayeeParty.cac_PartyUdid!= null) { int strlen_6 = envelope.content.claims.Value.cac_PayeeParty.cac_PartyUdid.Length * 2; *(int*)targetPtr = strlen_6; targetPtr += sizeof(int); fixed(char* pstr_6 = envelope.content.claims.Value.cac_PayeeParty.cac_PartyUdid) { Memory.Copy(pstr_6, targetPtr, strlen_6); targetPtr += strlen_6; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } { { *(long*)targetPtr = envelope.content.claims.Value.cac_Delivery.cbc_ActualDeliveryDate.ToBinary(); targetPtr += 8; } { { byte* optheader_7 = targetPtr; *(optheader_7 + 0) = 0x00; targetPtr += 1; if(envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeID!= null) { int strlen_8 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeID.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeID) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeAgencyID!= null) { if(envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeAgencyID!= null) { int strlen_8 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeAgencyID.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID._schemeAgencyID) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_7 + 0) |= 0x01; } if(envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID.code!= null) { int strlen_8 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID.code.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cbc_ID.code) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } if(envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cac_AddressUdid!= null) { int strlen_7 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cac_AddressUdid.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_Delivery.cac_DeliveryLocation.cac_AddressUdid) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } } if(envelope.content.claims.Value.cac_PaymentMeansUdid!= null) { int strlen_5 = envelope.content.claims.Value.cac_PaymentMeansUdid.Length * 2; *(int*)targetPtr = strlen_5; targetPtr += sizeof(int); fixed(char* pstr_5 = envelope.content.claims.Value.cac_PaymentMeansUdid) { Memory.Copy(pstr_5, targetPtr, strlen_5); targetPtr += strlen_5; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { { *(ISO639_1_LanguageCodes*)targetPtr = envelope.content.claims.Value.cac_PaymentTerms.cbc_Note._languageID; targetPtr += 1; if(envelope.content.claims.Value.cac_PaymentTerms.cbc_Note.note!= null) { int strlen_7 = envelope.content.claims.Value.cac_PaymentTerms.cbc_Note.note.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_PaymentTerms.cbc_Note.note) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } } { byte *storedPtr_5 = targetPtr; targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_AllowanceCharges!= null) { for(int iterator_5 = 0;iterator_5<envelope.content.claims.Value.cac_AllowanceCharges.Count;++iterator_5) { { *(bool*)targetPtr = envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_ChargeIndicator; targetPtr += 1; if(envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_AllowanceChargeReason!= null) { int strlen_7 = envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_AllowanceChargeReason.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_AllowanceChargeReason) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { if(envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_Amount._CurrencyID!= null) { int strlen_8 = envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_Amount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_Amount._CurrencyID) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_AllowanceCharges[iterator_5].cbc_Amount.amount; targetPtr += 8; } } } } *(int*)storedPtr_5 = (int)(targetPtr - storedPtr_5 - 4); } { { if(envelope.content.claims.Value.cac_TaxTotal.cbc_TaxAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_TaxTotal.cbc_TaxAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_TaxTotal.cbc_TaxAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_TaxTotal.cbc_TaxAmount.amount; targetPtr += 8; } { byte *storedPtr_6 = targetPtr; targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals!= null) { for(int iterator_6 = 0;iterator_6<envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals.Count;++iterator_6) { { { if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxableAmount._CurrencyID!= null) { int strlen_9 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxableAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_9; targetPtr += sizeof(int); fixed(char* pstr_9 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxableAmount._CurrencyID) { Memory.Copy(pstr_9, targetPtr, strlen_9); targetPtr += strlen_9; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxableAmount.amount; targetPtr += 8; } { if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxAmount._CurrencyID!= null) { int strlen_9 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_9; targetPtr += sizeof(int); fixed(char* pstr_9 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxAmount._CurrencyID) { Memory.Copy(pstr_9, targetPtr, strlen_9); targetPtr += strlen_9; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cbc_TaxAmount.amount; targetPtr += 8; } { { byte* optheader_9 = targetPtr; *(optheader_9 + 0) = 0x00; targetPtr += 1; if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeID!= null) { int strlen_10 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeID.Length * 2; *(int*)targetPtr = strlen_10; targetPtr += sizeof(int); fixed(char* pstr_10 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeID) { Memory.Copy(pstr_10, targetPtr, strlen_10); targetPtr += strlen_10; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeAgencyID!= null) { if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeAgencyID!= null) { int strlen_10 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeAgencyID.Length * 2; *(int*)targetPtr = strlen_10; targetPtr += sizeof(int); fixed(char* pstr_10 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID._schemeAgencyID) { Memory.Copy(pstr_10, targetPtr, strlen_10); targetPtr += strlen_10; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_9 + 0) |= 0x01; } if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID.code!= null) { int strlen_10 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID.code.Length * 2; *(int*)targetPtr = strlen_10; targetPtr += sizeof(int); fixed(char* pstr_10 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_ID.code) { Memory.Copy(pstr_10, targetPtr, strlen_10); targetPtr += strlen_10; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } *(double*)targetPtr = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cbc_Percent; targetPtr += 8; { { byte* optheader_10 = targetPtr; *(optheader_10 + 0) = 0x00; targetPtr += 1; if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID!= null) { int strlen_11 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID.Length * 2; *(int*)targetPtr = strlen_11; targetPtr += sizeof(int); fixed(char* pstr_11 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID) { Memory.Copy(pstr_11, targetPtr, strlen_11); targetPtr += strlen_11; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID!= null) { if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID!= null) { int strlen_11 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID.Length * 2; *(int*)targetPtr = strlen_11; targetPtr += sizeof(int); fixed(char* pstr_11 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID) { Memory.Copy(pstr_11, targetPtr, strlen_11); targetPtr += strlen_11; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_10 + 0) |= 0x01; } if(envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID.code!= null) { int strlen_11 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID.code.Length * 2; *(int*)targetPtr = strlen_11; targetPtr += sizeof(int); fixed(char* pstr_11 = envelope.content.claims.Value.cac_TaxTotal.cac_TaxSubtotals[iterator_6].cac_TaxCategory.cac_TaxScheme.cbc_ID.code) { Memory.Copy(pstr_11, targetPtr, strlen_11); targetPtr += strlen_11; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } } } } } } *(int*)storedPtr_6 = (int)(targetPtr - storedPtr_6 - 4); } } { { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_LineExtensionAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_LineExtensionAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_LineExtensionAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_LineExtensionAmount.amount; targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxExclusiveAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxExclusiveAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxExclusiveAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxExclusiveAmount.amount; targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxInclusiveAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxInclusiveAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxInclusiveAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_TaxInclusiveAmount.amount; targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_AllowanceTotalAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_AllowanceTotalAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_AllowanceTotalAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_AllowanceTotalAmount.amount; targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_ChargeTotalAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_ChargeTotalAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_ChargeTotalAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_ChargeTotalAmount.amount; targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PrepaidAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PrepaidAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PrepaidAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PrepaidAmount.amount; targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableRoundingAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableRoundingAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableRoundingAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableRoundingAmount.amount; targetPtr += 8; } { if(envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableAmount._CurrencyID!= null) { int strlen_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableAmount._CurrencyID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_LegalMonetaryTotal.cbc_PayableAmount.amount; targetPtr += 8; } } { byte *storedPtr_5 = targetPtr; targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_InvoiceLine!= null) { for(int iterator_5 = 0;iterator_5<envelope.content.claims.Value.cac_InvoiceLine.Count;++iterator_5) { { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_ID!= null) { int strlen_7 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_ID.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_ID) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { *(ISO639_1_LanguageCodes*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_Note._languageID; targetPtr += 1; if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_Note.note!= null) { int strlen_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_Note.note.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_Note.note) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_InvoicedQuantity._unitCode!= null) { int strlen_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_InvoicedQuantity._unitCode.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_InvoicedQuantity._unitCode) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(long*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_InvoicedQuantity.quantity; targetPtr += 8; } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_LineExtensionAmount._CurrencyID!= null) { int strlen_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_LineExtensionAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_LineExtensionAmount._CurrencyID) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_LineExtensionAmount.amount; targetPtr += 8; } if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_AccountingCost!= null) { int strlen_7 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_AccountingCost.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cbc_AccountingCost) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_OrderLineReference.cbc_LineID!= null) { int strlen_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_OrderLineReference.cbc_LineID.Length * 2; *(int*)targetPtr = strlen_8; targetPtr += sizeof(int); fixed(char* pstr_8 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_OrderLineReference.cbc_LineID) { Memory.Copy(pstr_8, targetPtr, strlen_8); targetPtr += strlen_8; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } { byte *storedPtr_7 = targetPtr; targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges!= null) { for(int iterator_7 = 0;iterator_7<envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges.Count;++iterator_7) { { *(bool*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_ChargeIndicator; targetPtr += 1; if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_AllowanceChargeReason!= null) { int strlen_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_AllowanceChargeReason.Length * 2; *(int*)targetPtr = strlen_9; targetPtr += sizeof(int); fixed(char* pstr_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_AllowanceChargeReason) { Memory.Copy(pstr_9, targetPtr, strlen_9); targetPtr += strlen_9; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_Amount._CurrencyID!= null) { int strlen_10 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_Amount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_10; targetPtr += sizeof(int); fixed(char* pstr_10 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_Amount._CurrencyID) { Memory.Copy(pstr_10, targetPtr, strlen_10); targetPtr += strlen_10; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_AllowanceCharges[iterator_7].cbc_Amount.amount; targetPtr += 8; } } } } *(int*)storedPtr_7 = (int)(targetPtr - storedPtr_7 - 4); } { { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cbc_TaxAmount._CurrencyID!= null) { int strlen_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cbc_TaxAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_9; targetPtr += sizeof(int); fixed(char* pstr_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cbc_TaxAmount._CurrencyID) { Memory.Copy(pstr_9, targetPtr, strlen_9); targetPtr += strlen_9; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cbc_TaxAmount.amount; targetPtr += 8; } { byte *storedPtr_8 = targetPtr; targetPtr += sizeof(int); if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals!= null) { for(int iterator_8 = 0;iterator_8<envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals.Count;++iterator_8) { { { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxableAmount._CurrencyID!= null) { int strlen_11 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxableAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_11; targetPtr += sizeof(int); fixed(char* pstr_11 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxableAmount._CurrencyID) { Memory.Copy(pstr_11, targetPtr, strlen_11); targetPtr += strlen_11; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxableAmount.amount; targetPtr += 8; } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxAmount._CurrencyID!= null) { int strlen_11 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_11; targetPtr += sizeof(int); fixed(char* pstr_11 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxAmount._CurrencyID) { Memory.Copy(pstr_11, targetPtr, strlen_11); targetPtr += strlen_11; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cbc_TaxAmount.amount; targetPtr += 8; } { { byte* optheader_11 = targetPtr; *(optheader_11 + 0) = 0x00; targetPtr += 1; if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeID!= null) { int strlen_12 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeID.Length * 2; *(int*)targetPtr = strlen_12; targetPtr += sizeof(int); fixed(char* pstr_12 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeID) { Memory.Copy(pstr_12, targetPtr, strlen_12); targetPtr += strlen_12; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeAgencyID!= null) { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeAgencyID!= null) { int strlen_12 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeAgencyID.Length * 2; *(int*)targetPtr = strlen_12; targetPtr += sizeof(int); fixed(char* pstr_12 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID._schemeAgencyID) { Memory.Copy(pstr_12, targetPtr, strlen_12); targetPtr += strlen_12; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_11 + 0) |= 0x01; } if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID.code!= null) { int strlen_12 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID.code.Length * 2; *(int*)targetPtr = strlen_12; targetPtr += sizeof(int); fixed(char* pstr_12 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_ID.code) { Memory.Copy(pstr_12, targetPtr, strlen_12); targetPtr += strlen_12; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } *(double*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cbc_Percent; targetPtr += 8; { { byte* optheader_12 = targetPtr; *(optheader_12 + 0) = 0x00; targetPtr += 1; if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID!= null) { int strlen_13 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID.Length * 2; *(int*)targetPtr = strlen_13; targetPtr += sizeof(int); fixed(char* pstr_13 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeID) { Memory.Copy(pstr_13, targetPtr, strlen_13); targetPtr += strlen_13; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if( envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID!= null) { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID!= null) { int strlen_13 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID.Length * 2; *(int*)targetPtr = strlen_13; targetPtr += sizeof(int); fixed(char* pstr_13 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID._schemeAgencyID) { Memory.Copy(pstr_13, targetPtr, strlen_13); targetPtr += strlen_13; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_12 + 0) |= 0x01; } if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID.code!= null) { int strlen_13 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID.code.Length * 2; *(int*)targetPtr = strlen_13; targetPtr += sizeof(int); fixed(char* pstr_13 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_TaxTotal.cac_TaxSubtotals[iterator_8].cac_TaxCategory.cac_TaxScheme.cbc_ID.code) { Memory.Copy(pstr_13, targetPtr, strlen_13); targetPtr += strlen_13; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } } } } } } *(int*)storedPtr_8 = (int)(targetPtr - storedPtr_8 - 4); } } if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_ItemUdid!= null) { int strlen_7 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_ItemUdid.Length * 2; *(int*)targetPtr = strlen_7; targetPtr += sizeof(int); fixed(char* pstr_7 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_ItemUdid) { Memory.Copy(pstr_7, targetPtr, strlen_7); targetPtr += strlen_7; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_PriceAmount._CurrencyID!= null) { int strlen_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_PriceAmount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_9; targetPtr += sizeof(int); fixed(char* pstr_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_PriceAmount._CurrencyID) { Memory.Copy(pstr_9, targetPtr, strlen_9); targetPtr += strlen_9; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_PriceAmount.amount; targetPtr += 8; } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_BaseQuantity._unitCode!= null) { int strlen_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_BaseQuantity._unitCode.Length * 2; *(int*)targetPtr = strlen_9; targetPtr += sizeof(int); fixed(char* pstr_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_BaseQuantity._unitCode) { Memory.Copy(pstr_9, targetPtr, strlen_9); targetPtr += strlen_9; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(long*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cbc_BaseQuantity.quantity; targetPtr += 8; } { *(bool*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_ChargeIndicator; targetPtr += 1; if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_AllowanceChargeReason!= null) { int strlen_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_AllowanceChargeReason.Length * 2; *(int*)targetPtr = strlen_9; targetPtr += sizeof(int); fixed(char* pstr_9 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_AllowanceChargeReason) { Memory.Copy(pstr_9, targetPtr, strlen_9); targetPtr += strlen_9; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } { if(envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_Amount._CurrencyID!= null) { int strlen_10 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_Amount._CurrencyID.Length * 2; *(int*)targetPtr = strlen_10; targetPtr += sizeof(int); fixed(char* pstr_10 = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_Amount._CurrencyID) { Memory.Copy(pstr_10, targetPtr, strlen_10); targetPtr += strlen_10; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(double*)targetPtr = envelope.content.claims.Value.cac_InvoiceLine[iterator_5].cac_Price.cac_AllowanceCharge.cbc_Amount.amount; targetPtr += 8; } } } } } } *(int*)storedPtr_5 = (int)(targetPtr - storedPtr_5 - 4); } }*(optheader_3 + 0) |= 0x02; } if( envelope.content.encryptedclaims!= null) { { if(envelope.content.encryptedclaims.Value.ciphertext16!= null) { int strlen_5 = envelope.content.encryptedclaims.Value.ciphertext16.Length * 2; *(int*)targetPtr = strlen_5; targetPtr += sizeof(int); fixed(char* pstr_5 = envelope.content.encryptedclaims.Value.ciphertext16) { Memory.Copy(pstr_5, targetPtr, strlen_5); targetPtr += strlen_5; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(envelope.content.encryptedclaims.Value.alg!= null) { int strlen_5 = envelope.content.encryptedclaims.Value.alg.Length * 2; *(int*)targetPtr = strlen_5; targetPtr += sizeof(int); fixed(char* pstr_5 = envelope.content.encryptedclaims.Value.alg) { Memory.Copy(pstr_5, targetPtr, strlen_5); targetPtr += strlen_5; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if(envelope.content.encryptedclaims.Value.key!= null) { int strlen_5 = envelope.content.encryptedclaims.Value.key.Length * 2; *(int*)targetPtr = strlen_5; targetPtr += sizeof(int); fixed(char* pstr_5 = envelope.content.encryptedclaims.Value.key) { Memory.Copy(pstr_5, targetPtr, strlen_5); targetPtr += strlen_5; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } }*(optheader_3 + 0) |= 0x04; } } { byte* optheader_3 = targetPtr; *(optheader_3 + 0) = 0x00; targetPtr += 1; *(TRACredentialType*)targetPtr = envelope.label.credtype; targetPtr += 1; *(long*)targetPtr = envelope.label.version; targetPtr += 8; *(TRATrustLevel*)targetPtr = envelope.label.trustLevel; targetPtr += 1; *(TRAEncryptionFlag*)targetPtr = envelope.label.encryptionFlag; targetPtr += 1; if(envelope.label.notaryudid!= null) { int strlen_4 = envelope.label.notaryudid.Length * 2; *(int*)targetPtr = strlen_4; targetPtr += sizeof(int); fixed(char* pstr_4 = envelope.label.notaryudid) { Memory.Copy(pstr_4, targetPtr, strlen_4); targetPtr += strlen_4; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } if( envelope.label.name!= null) { if(envelope.label.name!= null) { int strlen_4 = envelope.label.name.Length * 2; *(int*)targetPtr = strlen_4; targetPtr += sizeof(int); fixed(char* pstr_4 = envelope.label.name) { Memory.Copy(pstr_4, targetPtr, strlen_4); targetPtr += strlen_4; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_3 + 0) |= 0x01; } if( envelope.label.comment!= null) { if(envelope.label.comment!= null) { int strlen_4 = envelope.label.comment.Length * 2; *(int*)targetPtr = strlen_4; targetPtr += sizeof(int); fixed(char* pstr_4 = envelope.label.comment) { Memory.Copy(pstr_4, targetPtr, strlen_4); targetPtr += strlen_4; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_3 + 0) |= 0x02; } } } { byte* optheader_2 = targetPtr; *(optheader_2 + 0) = 0x00; targetPtr += 1; if( envelopeseal.hashedThumbprint64!= null) { if(envelopeseal.hashedThumbprint64!= null) { int strlen_3 = envelopeseal.hashedThumbprint64.Length * 2; *(int*)targetPtr = strlen_3; targetPtr += sizeof(int); fixed(char* pstr_3 = envelopeseal.hashedThumbprint64) { Memory.Copy(pstr_3, targetPtr, strlen_3); targetPtr += strlen_3; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_2 + 0) |= 0x01; } if( envelopeseal.signedHashSignature64!= null) { if(envelopeseal.signedHashSignature64!= null) { int strlen_3 = envelopeseal.signedHashSignature64.Length * 2; *(int*)targetPtr = strlen_3; targetPtr += sizeof(int); fixed(char* pstr_3 = envelopeseal.signedHashSignature64) { Memory.Copy(pstr_3, targetPtr, strlen_3); targetPtr += strlen_3; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_2 + 0) |= 0x02; } if( envelopeseal.notaryStamp!= null) { if(envelopeseal.notaryStamp!= null) { int strlen_3 = envelopeseal.notaryStamp.Length * 2; *(int*)targetPtr = strlen_3; targetPtr += sizeof(int); fixed(char* pstr_3 = envelopeseal.notaryStamp) { Memory.Copy(pstr_3, targetPtr, strlen_3); targetPtr += strlen_3; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } *(optheader_2 + 0) |= 0x04; } if( envelopeseal.comments!= null) { { byte *storedPtr_3 = targetPtr; targetPtr += sizeof(int); if(envelopeseal.comments!= null) { for(int iterator_3 = 0;iterator_3<envelopeseal.comments.Count;++iterator_3) { if(envelopeseal.comments[iterator_3]!= null) { int strlen_4 = envelopeseal.comments[iterator_3].Length * 2; *(int*)targetPtr = strlen_4; targetPtr += sizeof(int); fixed(char* pstr_4 = envelopeseal.comments[iterator_3]) { Memory.Copy(pstr_4, targetPtr, strlen_4); targetPtr += strlen_4; } }else { *(int*)targetPtr = 0; targetPtr += sizeof(int); } } } *(int*)storedPtr_3 = (int)(targetPtr - storedPtr_3 - 4); } *(optheader_2 + 0) |= 0x08; } } } } return storage.SaveCell(tx, options, cellId, tmpcell, 0, tmpcell.Length, (ushort)CellType.UBL21_Invoice2_Cell) == TrinityErrorCode.E_SUCCESS; } /// <summary> /// Adds a new cell of type UBL21_Invoice2_Cell to the key-value store if the cell Id does not exist, or updates an existing cell in the key-value store if the cell Id already exists. The parameter <paramref name="cellId"/> overrides the cell id in the content object. /// </summary> /// <param name="storage"/>A <see cref="Trinity.Storage.LocalMemoryStorage"/> instance.</param> /// <param name="cellId">A 64-bit cell Id.</param> /// <param name="options">Specifies write-ahead logging behavior. Valid values are CellAccessOptions.StrongLogAhead(default) and CellAccessOptions.WeakLogAhead. Other values are ignored.</param> /// <param name="cellContent">The content of the cell.</param> /// <returns>true if saving succeeds; otherwise, false.</returns> public unsafe static bool SaveUBL21_Invoice2_Cell(this Trinity.Storage.LocalMemoryStorage storage, LocalTransactionContext tx, CellAccessOptions options, long cellId, UBL21_Invoice2_Cell cellContent) { return SaveUBL21_Invoice2_Cell(storage, tx, options, cellId , cellContent.envelope , cellContent.envelopeseal ); } /// <summary> /// Adds a new cell of type UBL21_Invoice2_Cell to the key-value store if the cell Id does not exist, or updates an existing cell in the key-value store if the cell Id already exists. Cell Id is specified by the CellId field in the content object. /// </summary> /// <param name="storage"/>A <see cref="Trinity.Storage.LocalMemoryStorage"/> instance.</param> /// <param name="options">Specifies write-ahead logging behavior. Valid values are CellAccessOptions.StrongLogAhead(default) and CellAccessOptions.WeakLogAhead. Other values are ignored.</param> /// <param name="cellContent">The content of the cell.</param> /// <returns>true if saving succeeds; otherwise, false.</returns> public unsafe static bool SaveUBL21_Invoice2_Cell(this Trinity.Storage.LocalMemoryStorage storage, LocalTransactionContext tx, CellAccessOptions options, UBL21_Invoice2_Cell cellContent) { return SaveUBL21_Invoice2_Cell(storage, tx, options, cellContent.CellId , cellContent.envelope , cellContent.envelopeseal ); } /// <summary> /// Loads the content of the specified cell. Any changes done to this object are not written to the store, unless /// the content object is saved back into the storage. /// <param name="storage"/>A <see cref="Trinity.Storage.LocalMemoryStorage"/> instance.</param> /// </summary> public unsafe static UBL21_Invoice2_Cell LoadUBL21_Invoice2_Cell(this Trinity.Storage.LocalMemoryStorage storage, LocalTransactionContext tx, long cellId) { using (var cell = UBL21_Invoice2_Cell_Accessor._get()._Lock(cellId, CellAccessOptions.ThrowExceptionOnCellNotFound, tx)) { return cell; } } #endregion } } #pragma warning restore 162,168,649,660,661,1522
37.38113
323
0.55381
[ "MIT" ]
mwherman2000/TrustedDigitalWeb
TDW.Servers/TDW.TRAServer/obj/Debug/netcoreapp3.1/GeneratedCode/Cells/UBL21_Invoice2_Cell.cs
621,237
C#
#if (UNITY_STANDALONE_WIN && !UNITY_EDITOR) || UNITY_EDITOR_WIN //------------------------------------------------------------------------------ // <auto-generated /> // // This file was automatically generated by SWIG (http://www.swig.org). // Version 3.0.12 // // Do not make changes to this file unless you know what you are doing--modify // the SWIG interface file instead. //------------------------------------------------------------------------------ public enum AkAudioAPI { AkAPI_Wasapi = 1 << 0, AkAPI_XAudio2 = 1 << 1, AkAPI_DirectSound = 1 << 2, AkAPI_Default = AkAPI_Wasapi|AkAPI_XAudio2|AkAPI_DirectSound } #endif // #if (UNITY_STANDALONE_WIN && !UNITY_EDITOR) || UNITY_EDITOR_WIN
38.052632
81
0.542185
[ "Apache-2.0" ]
Bellseboss-Studio/ProyectoPrincipal_JuegoDePeleas
Assets/Wwise/Deployment/API/Generated/Windows/AkAudioAPI_Windows.cs
723
C#
//------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ namespace PrimaryKeysConfigTest.Account { public partial class ResetPasswordConfirmation { } }
29.5
80
0.444915
[ "Apache-2.0" ]
ASCITSOL/asp.net
samples/aspnet/Identity/ChangePK/PrimaryKeysConfigTest/Account/ResetPasswordConfirmation.aspx.designer.cs
472
C#
// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; namespace Microsoft.AspNetCore.Authentication { /// <summary> /// Extension methods for storing authentication tokens in <see cref="AuthenticationProperties"/>. /// </summary> public static class AuthenticationTokenExtensions { private static string TokenNamesKey = ".TokenNames"; private static string TokenKeyPrefix = ".Token."; /// <summary> /// Stores a set of authentication tokens, after removing any old tokens. /// </summary> /// <param name="properties">The <see cref="AuthenticationProperties"/> properties.</param> /// <param name="tokens">The tokens to store.</param> public static void StoreTokens(this AuthenticationProperties properties, IEnumerable<AuthenticationToken> tokens) { if (properties == null) { throw new ArgumentNullException(nameof(properties)); } if (tokens == null) { throw new ArgumentNullException(nameof(tokens)); } // Clear old tokens first var oldTokens = properties.GetTokens(); foreach (var t in oldTokens) { properties.Items.Remove(TokenKeyPrefix + t.Name); } properties.Items.Remove(TokenNamesKey); var tokenNames = new List<string>(); foreach (var token in tokens) { // REVIEW: should probably check that there are no ; in the token name and throw or encode tokenNames.Add(token.Name); properties.Items[TokenKeyPrefix+token.Name] = token.Value; } if (tokenNames.Count > 0) { properties.Items[TokenNamesKey] = string.Join(";", tokenNames.ToArray()); } } /// <summary> /// Returns the value of a token. /// </summary> /// <param name="properties">The <see cref="AuthenticationProperties"/> properties.</param> /// <param name="tokenName">The token name.</param> /// <returns>The token value.</returns> public static string GetTokenValue(this AuthenticationProperties properties, string tokenName) { if (properties == null) { throw new ArgumentNullException(nameof(properties)); } if (tokenName == null) { throw new ArgumentNullException(nameof(tokenName)); } var tokenKey = TokenKeyPrefix + tokenName; return properties.Items.ContainsKey(tokenKey) ? properties.Items[tokenKey] : null; } public static bool UpdateTokenValue(this AuthenticationProperties properties, string tokenName, string tokenValue) { if (properties == null) { throw new ArgumentNullException(nameof(properties)); } if (tokenName == null) { throw new ArgumentNullException(nameof(tokenName)); } var tokenKey = TokenKeyPrefix + tokenName; if (!properties.Items.ContainsKey(tokenKey)) { return false; } properties.Items[tokenKey] = tokenValue; return true; } /// <summary> /// Returns all of the AuthenticationTokens contained in the properties. /// </summary> /// <param name="properties">The <see cref="AuthenticationProperties"/> properties.</param> /// <returns>The authentication toekns.</returns> public static IEnumerable<AuthenticationToken> GetTokens(this AuthenticationProperties properties) { if (properties == null) { throw new ArgumentNullException(nameof(properties)); } var tokens = new List<AuthenticationToken>(); if (properties.Items.ContainsKey(TokenNamesKey)) { var tokenNames = properties.Items[TokenNamesKey].Split(';'); foreach (var name in tokenNames) { var token = properties.GetTokenValue(name); if (token != null) { tokens.Add(new AuthenticationToken { Name = name, Value = token }); } } } return tokens; } /// <summary> /// Extension method for getting the value of an authentication token. /// </summary> /// <param name="auth">The <see cref="IAuthenticationService"/>.</param> /// <param name="context">The <see cref="HttpContext"/> context.</param> /// <param name="tokenName">The name of the token.</param> /// <returns>The value of the token.</returns> public static Task<string> GetTokenAsync(this IAuthenticationService auth, HttpContext context, string tokenName) => auth.GetTokenAsync(context, scheme: null, tokenName: tokenName); /// <summary> /// Extension method for getting the value of an authentication token. /// </summary> /// <param name="auth">The <see cref="IAuthenticationService"/>.</param> /// <param name="context">The <see cref="HttpContext"/> context.</param> /// <param name="scheme">The name of the authentication scheme.</param> /// <param name="tokenName">The name of the token.</param> /// <returns>The value of the token.</returns> public static async Task<string> GetTokenAsync(this IAuthenticationService auth, HttpContext context, string scheme, string tokenName) { if (auth == null) { throw new ArgumentNullException(nameof(auth)); } if (tokenName == null) { throw new ArgumentNullException(nameof(tokenName)); } var result = await auth.AuthenticateAsync(context, scheme); return result?.Properties?.GetTokenValue(tokenName); } } }
39.89441
142
0.57263
[ "Apache-2.0" ]
benaadams/HttpAbstractions
src/Microsoft.AspNetCore.Authentication.Abstractions/TokenExtensions.cs
6,423
C#
using HurricaneVR.Framework.Core; using HurricaneVR.Framework.Core.Grabbers; using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerSword : MonoBehaviour { public PlayerDamageEventChannel playerDamageEventChannel; private HVRGrabbable hvrGrabbable; public bool hasBeenGrabbed; [Range(0f, 30f)] [Tooltip("The maximum distance the player can travel from the sword before it returns to the shoulder socket")] public float returnToSocketDistance; private void Awake() { hvrGrabbable = GetComponent<HVRGrabbable>(); } private void OnEnable() { playerDamageEventChannel.onPlayerRevive += OnPlayerDeath; hvrGrabbable.HandGrabbed.AddListener(OnGrabbed); } private void OnDisable() { playerDamageEventChannel.onPlayerRevive -= OnPlayerDeath; hvrGrabbable.HandGrabbed.RemoveListener(OnGrabbed); } private void Update() { // If the player has found the sword, and isn't holding it right now... if (hasBeenGrabbed && !hvrGrabbable.IsHandGrabbed) { // ... and they're too far from the sword, then return it to the shoulder socket float squaredDistanceToPlayer = (Player.Instance.playerController.transform.position - transform.position).sqrMagnitude; if (squaredDistanceToPlayer > returnToSocketDistance * returnToSocketDistance) { ReturnToShoulderSocket(); } } } private void OnGrabbed(HVRGrabberBase arg0, HVRGrabbable arg1) { hasBeenGrabbed = true; } private void OnPlayerDeath() { if (hasBeenGrabbed) { ReturnToActiveCheckpoint(); } else { ReturnToStartingSocket(); } } public void ReturnToActiveCheckpoint() { if (Player.Instance.activeCheckpoint.swordRespawnSocket == null) { Debug.LogWarning("Tried to return the sword to the active checkpoint, but the socket was null"); ReturnToShoulderSocket(); return; } Player.Instance.activeCheckpoint.swordRespawnSocket.TryGrab(hvrGrabbable, true); } public void ReturnToStartingSocket() { hvrGrabbable.StartingSocket.TryGrab(hvrGrabbable, true); } public void ReturnToShoulderSocket() { Player.Instance.shoulderSocket.TryGrab(hvrGrabbable, true); } }
35.414286
133
0.666801
[ "MIT" ]
iamrequest/shattered-skies
Assets/Scripts/Player/PlayerSword.cs
2,481
C#
// ReSharper disable ClassNeverInstantiated.Global // ReSharper disable MemberCanBePrivate.Global // ReSharper disable UnusedMember.Global // ReSharper disable InconsistentNaming // ReSharper disable SwitchExpressionHandlesSomeKnownEnumValuesWithExceptionInDefault // ReSharper disable RedundantNameQualifier namespace Pure.DI.UsageScenarios.Tests { using System; using Shouldly; using Xunit; using Pure.DI; public class OSSpecificImplementations { [Fact] // $visible=true // $tag=7 Samples // $priority=01 // $description=OS specific implementations // { public void Run() { DI.Setup() .Bind<IOsSpecific<TT>>().As(Lifetime.Singleton).To<OsSpecific<TT>>() // OS specific bindings .Bind<IDependency>(OSSpecificImplementations.OSPlatform.Windows).To<WindowsImpl>() .Bind<IDependency>(OSSpecificImplementations.OSPlatform.Linux).To<LinuxImpl>() .Bind<IDependency>(OSSpecificImplementations.OSPlatform.OSX).To<OSXImpl>() .Bind<IDependency>().To(ctx => ctx.Resolve<IOsSpecific<IDependency>>().Instance) // Other bindings .Bind<IService>().To<Service>(); var service = OSSpecificImplementationsDI.Resolve<IService>(); service.Run().Contains("Hello from").ShouldBeTrue(); } public interface IOsSpecific<out T> { T Instance { get; } } public enum OSPlatform { Windows, Linux, OSX } public class OsSpecific<T>: IOsSpecific<T> { private readonly Func<T> _windowsFactory; private readonly Func<T> _linuxFactory; private readonly Func<T> _osxFactory; public OsSpecific( [Tag(OSSpecificImplementations.OSPlatform.Windows)] Func<T> windowsFactory, [Tag(OSSpecificImplementations.OSPlatform.Linux)] Func<T> linuxFactory, [Tag(OSSpecificImplementations.OSPlatform.OSX)] Func<T> osxFactory) { _windowsFactory = windowsFactory; _linuxFactory = linuxFactory; _osxFactory = osxFactory; } public T Instance => Environment.OSVersion.Platform switch { PlatformID.Win32S => OSPlatform.Windows, PlatformID.Win32Windows => OSPlatform.Windows, PlatformID.Win32NT => OSPlatform.Windows, PlatformID.WinCE => OSPlatform.Windows, PlatformID.Xbox => OSPlatform.Windows, PlatformID.Unix => OSPlatform.Linux, PlatformID.MacOSX => OSPlatform.OSX, _ => throw new NotSupportedException() } switch { OSPlatform.Windows => _windowsFactory(), OSPlatform.Linux => _linuxFactory(), OSPlatform.OSX => _osxFactory(), _ => throw new NotSupportedException() }; } public interface IDependency { string GetMessage(); } public class WindowsImpl : IDependency { public string GetMessage() => "Hello from Windows"; } public class LinuxImpl : IDependency { public string GetMessage() => "Hello from Linux"; } public class OSXImpl : IDependency { public string GetMessage() => "Hello from OSX"; } public interface IService { string Run(); } public class Service : IService { private readonly IDependency _dependency; public Service(IDependency dependency) => _dependency = dependency; public string Run() => _dependency.GetMessage(); } // } } }
37.495327
102
0.564307
[ "MIT" ]
DevTeam/Pure.DI
Pure.DI.UsageScenarios.Tests/OSSpecificImplementations.cs
4,014
C#
using Ayehu.Sdk.ActivityCreation.Extension; using Ayehu.Sdk.ActivityCreation.Helpers; using Ayehu.Sdk.ActivityCreation.Interfaces; using System; using System.Collections.Generic; using System.Net; using System.Net.Http; using System.Text; namespace Ayehu.Sdk.ActivityCreation { public class AzureResourceDelete : IActivity { public string resourceId; public string authToken_password; public string api_version; public string Jsonkeypath = ""; private bool omitJsonEmptyorNull = false; private string contentType = "application/json"; private string endPoint = "https://management.azure.com"; private string httpMethod = "DELETE"; private string _uriBuilderPath; private string _postData; private Dictionary<string, string> _headers; private Dictionary<string, string> _queryStringArray; private string uriBuilderPath { get { if (string.IsNullOrEmpty(_uriBuilderPath)) { _uriBuilderPath = string.Format("/{0}", resourceId); } return _uriBuilderPath; } set { _uriBuilderPath = value; } } private string postData { get { if (string.IsNullOrEmpty(_postData)) { _postData = ""; } return _postData; } set { _postData = value; } } private Dictionary<string, string> headers { get { if (_headers == null) { _headers = new Dictionary<string, string>() { { "authorization", "Bearer " + authToken_password } }; } return _headers; } set { _headers = value; } } private Dictionary<string, string> queryStringArray { get { if (_queryStringArray == null) { _queryStringArray = new Dictionary<string, string>() { { "api-version", api_version } }; } return _queryStringArray; } set { this._queryStringArray = value; } } public ICustomActivityResult Execute() { var response = ApiCAll(); switch (response.StatusCode) { case HttpStatusCode.NoContent: case HttpStatusCode.Created: case HttpStatusCode.Accepted: case HttpStatusCode.OK: { if (string.IsNullOrEmpty(response.Content.ReadAsStringAsync().Result) == false) return this.GenerateActivityResult(response.Content.ReadAsStringAsync().Result, Jsonkeypath); else return this.GenerateActivityResult("Success"); } default: { if (string.IsNullOrEmpty(response.Content.ReadAsStringAsync().Result) == false) throw new Exception(response.Content.ReadAsStringAsync().Result); else if (string.IsNullOrEmpty(response.ReasonPhrase) == false) throw new Exception(response.ReasonPhrase); else throw new Exception(response.StatusCode.ToString()); } } } private HttpResponseMessage ApiCAll() { HttpClient client = new HttpClient(); ServicePointManager.Expect100Continue = true; ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; ServicePointManager.ServerCertificateValidationCallback = new System.Net.Security.RemoteCertificateValidationCallback(AcceptAllCertifications); UriBuilder UriBuilder = new UriBuilder(endPoint); UriBuilder.Path = uriBuilderPath; UriBuilder.Query = AyehuHelper.queryStringBuilder(queryStringArray); HttpRequestMessage HttpRequestMessage = new HttpRequestMessage(new HttpMethod(httpMethod), UriBuilder.ToString()); if (contentType == "application/x-www-form-urlencoded") HttpRequestMessage.Content = AyehuHelper.formUrlEncodedContent(postData); else { if (string.IsNullOrEmpty(postData) == false) { if (omitJsonEmptyorNull) HttpRequestMessage.Content = new StringContent(AyehuHelper.omitJsonEmptyorNull(postData), Encoding.UTF8, "application/json"); else HttpRequestMessage.Content = new StringContent(postData, Encoding.UTF8, contentType); } } foreach (KeyValuePair<string, string> headeritem in headers) client.DefaultRequestHeaders.Add(headeritem.Key, headeritem.Value); HttpResponseMessage response = client.SendAsync(HttpRequestMessage).Result; return response; } private bool AcceptAllCertifications(object sender, System.Security.Cryptography.X509Certificates.X509Certificate certification, System.Security.Cryptography.X509Certificates.X509Chain chain, System.Net.Security.SslPolicyErrors sslPolicyErrors) { return true; } } }
36.094937
252
0.550587
[ "MIT" ]
Ayehu/custom-activities
Azure/ConvertedAzureActivities/AzureResourceDelete/AzureResourceDelete.cs
5,703
C#
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using another_auth.Interfaces; namespace another_auth.sample { class Program { static void Main(string[] args) { IAuthDb authDb = new AuthDb(); var pepper = "changme"; var accountManager = new StandardAccountManager<SampleUser, SampleLogin>(authDb, pepper); accountManager.CreateUserWithLogin("foo@bar.com", "password1"); var result = accountManager.ValidLogin("foo@bar.com", "password1"); if (result.ResultType == LoginResult<SampleUser>.Type.success) { Console.WriteLine($"User {result.User.PrimaryEmailAddress} logged in OK"); } else if (result.ResultType == LoginResult<SampleUser>.Type.failiure) { Console.WriteLine($"Unable to login"); } else { throw new Exception("An unexpected value was returned from the AccountManger"); } Console.ReadLine(); } } }
28.925
101
0.585134
[ "MIT" ]
gmunro/another-auth
another-auth.sample/Program.cs
1,159
C#
//namespace System.Collections //{ // /// <summary> // /// FullValueSource // /// </summary> // internal enum FullValueSource : short // { // /// <summary> // /// HasExpressionMarker // /// </summary> // HasExpressionMarker = 0x100, // /// <summary> // /// IsAnimated // /// </summary> // IsAnimated = 0x20, // /// <summary> // /// IsCoerced // /// </summary> // IsCoerced = 0x40, // /// <summary> // /// IsDeferredReference // /// </summary> // IsDeferredReference = 0x80, // /// <summary> // /// IsExpression // /// </summary> // IsExpression = 0x10, // /// <summary> // /// ModifiersMask // /// </summary> // ModifiersMask = 0x70, // /// <summary> // /// ValueSourceMask // /// </summary> // ValueSourceMask = 15 // } //}
26.351351
44
0.41641
[ "Apache-2.0", "MIT" ]
Grimace1975/bclcontrib
Core/System.CoreEx_/System.Core.Objects/Collections/Object/Extended_/FullValueSource.cs
977
C#
// WARNING // // This file has been generated automatically by Visual Studio from the outlets and // actions declared in your storyboard file. // Manual changes to this file will not be maintained. // using Foundation; using System; using System.CodeDom.Compiler; namespace AppRopio.ECommerce.Products.iOS.Views.Catalog.Cells { [Register ("BadgeCell")] partial class BadgeCell { [Outlet] AppRopio.Base.iOS.Controls.ARLabel _badge { get; set; } [Outlet] UIKit.UIView _badgeView { get; set; } void ReleaseDesignerOutlets () { if (_badge != null) { _badge.Dispose (); _badge = null; } if (_badgeView != null) { _badgeView.Dispose (); _badgeView = null; } } } }
24.444444
84
0.551136
[ "Apache-2.0" ]
cryptobuks/AppRopio.Mobile
src/app-ropio/AppRopio.ECommerce/Products/iOS/Views/Catalog/Cells/BadgeCell.designer.cs
880
C#
using System; using HW.Core.Repositories; using HW.SF.Models.SYSModel; using HW.SF.Models; namespace HW.SF.IRepositories { public interface ILineRepository:IRepository<Sys_Line, String> { } }
18.545455
66
0.75
[ "MIT" ]
dahaideyu/HWPlatform
HW.SF.IRepositories/ILineRepository.cs
204
C#
using System.Collections.Generic; using System.Windows.Media; namespace System.Windows.Interactivity { public static class DependencyObjectHelper { public static IEnumerable<DependencyObject> GetSelfAndAncestors(this DependencyObject dependencyObject) { while (dependencyObject != null) { yield return dependencyObject; dependencyObject = VisualTreeHelper.GetParent(dependencyObject); } } } }
23.333333
105
0.783333
[ "MIT" ]
WertherHu/AYUI8Community
Ay/ay.contentcore/SharedCode/ui/System.Windows.Interactivity/DependencyObjectHelper.cs
420
C#
using Microsoft.AspNetCore.Mvc; using System.Text; namespace SampleWebApi_6_0.Controllers { [Route("api/[controller]")] [ApiController] public class ValuesController : ControllerBase { // GET api/values [HttpGet] public ActionResult<IEnumerable<string>> Get() { return new string[] { "value1", "value2" }; } [HttpGet("claims")] public ActionResult<string> Claims() { var sb = new StringBuilder(); foreach (var claim in User.Claims) { sb.AppendLine($"{claim.Type}: {claim.Value}"); } return sb.ToString(); } [HttpGet("forbid")] public new IActionResult Forbid() { return base.Forbid(); } } }
18.6
50
0.658986
[ "MIT" ]
mihirdilip/Mihir.AspNetCore.Authentication.Basic
samples/SampleWebApi_6_0/Controllers/ValuesController.cs
653
C#
namespace Quarrel.ViewModels.Messages.Gateway.Guild { public class GatewayGuildUpdatedMessage { public GatewayGuildUpdatedMessage(DiscordAPI.Models.Guilds.Guild guild) { Guild = guild; } public DiscordAPI.Models.Guilds.Guild Guild { get; } } }
23.230769
79
0.655629
[ "Apache-2.0" ]
UWPCommunity/Quarrel
src/Quarrel.ViewModels/Messages/Gateway/Guild/GatewayGuildUpdatedMessage.cs
304
C#
// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using System.Collections.Generic; using System.Security.Claims; using System.Threading.Tasks; using Microsoft.AspNet.Http.Features.Authentication; namespace Microsoft.AspNet.Http.Authentication { public abstract class AuthenticationManager { /// <summary> /// Constant used to represent the automatic scheme /// </summary> public const string AutomaticScheme = "Automatic"; public abstract IEnumerable<AuthenticationDescription> GetAuthenticationSchemes(); public abstract Task AuthenticateAsync(AuthenticateContext context); public virtual async Task<ClaimsPrincipal> AuthenticateAsync(string authenticationScheme) { if (authenticationScheme == null) { throw new ArgumentNullException(nameof(authenticationScheme)); } var context = new AuthenticateContext(authenticationScheme); await AuthenticateAsync(context); return context.Principal; } public virtual Task ChallengeAsync() { return ChallengeAsync(properties: null); } public virtual Task ChallengeAsync(AuthenticationProperties properties) { return ChallengeAsync(authenticationScheme: AutomaticScheme, properties: properties); } public virtual Task ChallengeAsync(string authenticationScheme) { if (string.IsNullOrEmpty(authenticationScheme)) { throw new ArgumentException(nameof(authenticationScheme)); } return ChallengeAsync(authenticationScheme: authenticationScheme, properties: null); } // Leave it up to authentication handler to do the right thing for the challenge public virtual Task ChallengeAsync(string authenticationScheme, AuthenticationProperties properties) { if (string.IsNullOrEmpty(authenticationScheme)) { throw new ArgumentException(nameof(authenticationScheme)); } return ChallengeAsync(authenticationScheme, properties, ChallengeBehavior.Automatic); } public virtual Task SignInAsync(string authenticationScheme, ClaimsPrincipal principal) { if (string.IsNullOrEmpty(authenticationScheme)) { throw new ArgumentException(nameof(authenticationScheme)); } if (principal == null) { throw new ArgumentNullException(nameof(principal)); } return SignInAsync(authenticationScheme, principal, properties: null); } public virtual Task ForbidAsync(string authenticationScheme) { if (authenticationScheme == null) { throw new ArgumentNullException(nameof(authenticationScheme)); } return ForbidAsync(authenticationScheme, properties: null); } // Deny access (typically a 403) public virtual Task ForbidAsync(string authenticationScheme, AuthenticationProperties properties) { if (authenticationScheme == null) { throw new ArgumentNullException(nameof(authenticationScheme)); } return ChallengeAsync(authenticationScheme, properties, ChallengeBehavior.Forbidden); } public abstract Task ChallengeAsync(string authenticationScheme, AuthenticationProperties properties, ChallengeBehavior behavior); public abstract Task SignInAsync(string authenticationScheme, ClaimsPrincipal principal, AuthenticationProperties properties); public virtual Task SignOutAsync(string authenticationScheme) { if (authenticationScheme == null) { throw new ArgumentNullException(nameof(authenticationScheme)); } return SignOutAsync(authenticationScheme, properties: null); } public abstract Task SignOutAsync(string authenticationScheme, AuthenticationProperties properties); } }
36.084034
138
0.662087
[ "Apache-2.0" ]
sebnema/HttpAbstractions-1.0.0-rc1-NoAuthHandler
src/Microsoft.AspNet.Http.Abstractions/Authentication/AuthenticationManager.cs
4,294
C#
// ------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved.​ // Licensed under the MIT License (MIT). See License.txt in the repo root for license information.​ // ------------------------------------------------------------ using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.Azure.Documents.Spatial; using WarmPathUI.Models; namespace WarmPathUI.Services { public interface IDeviceEventsRepository { Task<IEnumerable<DeviceEvent>> GetDeviceEventsAsync(Geometry rectangularArea); } }
33.5
100
0.608624
[ "MIT" ]
CNILearn/iot-guidance
src/WarmPath/WarmPathUI/WarmPathUI/Services/IDeviceEventsRepository.cs
607
C#
using SFA.Apprenticeships.Web.Common.Mediators; namespace SFA.Apprenticeships.Web.Candidate.Mediators.Account { using System; using ViewModels.Account; using ViewModels.MyApplications; public interface IAccountMediator { MediatorResponse<MyApplicationsViewModel> Index(Guid candidateId, string deletedVacancyId, string deletedVacancyTitle); MediatorResponse Archive(Guid candidateId, int vacancyId); MediatorResponse Delete(Guid candidateId, int vacancyId); MediatorResponse DismissTraineeshipPrompts(Guid candidateId); MediatorResponse<SettingsViewModel> Settings(Guid candidateId, SettingsViewModel.SettingsMode mode); MediatorResponse<SettingsViewModel> SaveSettings(Guid candidateId, SettingsViewModel settingsViewModel); MediatorResponse<SettingsViewModel> SetAccountStatusToDelete(Guid candidateId); MediatorResponse VerifyAccountSettings(Guid candidateId, DeleteAccountSettingsViewModel settingsViewModel); MediatorResponse Track(Guid candidateId, int vacancyId); MediatorResponse AcceptTermsAndConditions(Guid candidateId); MediatorResponse ApprenticeshipVacancyDetails(Guid candidateId, int vacancyId); MediatorResponse TraineeshipVacancyDetails(Guid candidateId, int vacancyId); MediatorResponse<VerifyMobileViewModel> VerifyMobile(Guid candidateId, string returnUrl); MediatorResponse<VerifyMobileViewModel> VerifyMobile(Guid candidateId, VerifyMobileViewModel verifyMobileViewModel); MediatorResponse<VerifyMobileViewModel> Resend(Guid candidateId, VerifyMobileViewModel model); MediatorResponse<SavedSearchViewModel> DeleteSavedSearch(Guid candidateId, Guid savedSearchId); MediatorResponse<VerifyUpdatedEmailViewModel> VerifyUpdatedEmailAddress(Guid userId, VerifyUpdatedEmailViewModel model); MediatorResponse<EmailViewModel> UpdateEmailAddress(Guid userId, EmailViewModel emailViewModel); MediatorResponse<VerifyUpdatedEmailViewModel> ResendUpdateEmailAddressCode(Guid userId); } }
42.734694
128
0.80086
[ "MIT" ]
BugsUK/FindApprenticeship
src/SFA.Apprenticeships.Web.Candidate/Mediators/Account/IAccountMediator.cs
2,096
C#
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Copyright (c) Microsoft Corporation. All rights reserved. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// using System; using Microsoft.SPOT; using Microsoft.SPOT.Platform.Test; namespace Microsoft.SPOT.Platform.Tests { public class FunctionalCases : IMFTestInterface { [SetUp] public InitializeResult Initialize() { Log.Comment("Adding set up for the tests"); return InitializeResult.ReadyToGo; } [TearDown] public void CleanUp() { Log.Comment("Cleaning up after the tests."); // TODO: Add your clean up steps here. } // TODO - add functional path cases when FS is fully working } }
35.774194
201
0.373309
[ "Apache-2.0" ]
AustinWise/Netduino-Micro-Framework
Test/Platform/Tests/CLR/System/IO/Path/FunctionalCases.cs
1,109
C#
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using System.Collections.Generic; using System.Collections.Immutable; using System.Diagnostics; using System.Linq; using Microsoft.CodeAnalysis.CodeGen; using Microsoft.CodeAnalysis.Collections; using Microsoft.CodeAnalysis.CSharp.Emit; using Microsoft.CodeAnalysis.CSharp.Symbols; using Microsoft.CodeAnalysis.ExpressionEvaluator; using Microsoft.CodeAnalysis.PooledObjects; using Roslyn.Utilities; namespace Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator { internal delegate BoundExpression GenerateThisReference(SyntaxNode syntax); internal delegate BoundStatement GenerateMethodBody( EEMethodSymbol method, DiagnosticBag diagnostics, out ImmutableArray<LocalSymbol> declaredLocals, out ResultProperties properties); /// <summary> /// Synthesized expression evaluation method. /// </summary> internal sealed class EEMethodSymbol : MethodSymbol { // We only create a single EE method (per EE type) that represents an arbitrary expression, // whose lowering may produce synthesized members (lambdas, dynamic sites, etc). // We may thus assume that the method ordinal is always 0. // // Consider making the implementation more flexible in order to avoid this assumption. // In future we might need to compile multiple expression and then we'll need to assign // a unique method ordinal to each of them to avoid duplicate synthesized member names. private const int _methodOrdinal = 0; internal readonly TypeMap TypeMap; internal readonly MethodSymbol SubstitutedSourceMethod; internal readonly ImmutableArray<LocalSymbol> Locals; internal readonly ImmutableArray<LocalSymbol> LocalsForBinding; private readonly EENamedTypeSymbol _container; private readonly string _name; private readonly ImmutableArray<Location> _locations; private readonly ImmutableArray<TypeParameterSymbol> _typeParameters; private readonly ImmutableArray<ParameterSymbol> _parameters; private readonly ParameterSymbol _thisParameter; private readonly ImmutableDictionary<string, DisplayClassVariable> _displayClassVariables; /// <summary> /// Invoked at most once to generate the method body. /// (If the compilation has no errors, it will be invoked /// exactly once, otherwise it may be skipped.) /// </summary> private readonly GenerateMethodBody _generateMethodBody; private TypeSymbolWithAnnotations _lazyReturnType; private ResultProperties _lazyResultProperties; // NOTE: This is only used for asserts, so it could be conditional on DEBUG. private readonly ImmutableArray<TypeParameterSymbol> _allTypeParameters; internal EEMethodSymbol( EENamedTypeSymbol container, string name, Location location, MethodSymbol sourceMethod, ImmutableArray<LocalSymbol> sourceLocals, ImmutableArray<LocalSymbol> sourceLocalsForBinding, ImmutableDictionary<string, DisplayClassVariable> sourceDisplayClassVariables, GenerateMethodBody generateMethodBody) { Debug.Assert(sourceMethod.IsDefinition); Debug.Assert(sourceMethod.ContainingSymbol == container.SubstitutedSourceType.OriginalDefinition); Debug.Assert(sourceLocals.All(l => l.ContainingSymbol == sourceMethod)); _container = container; _name = name; _locations = ImmutableArray.Create(location); // What we want is to map all original type parameters to the corresponding new type parameters // (since the old ones have the wrong owners). Unfortunately, we have a circular dependency: // 1) Each new type parameter requires the entire map in order to be able to construct its constraint list. // 2) The map cannot be constructed until all new type parameters exist. // Our solution is to pass each new type parameter a lazy reference to the type map. We then // initialize the map as soon as the new type parameters are available - and before they are // handed out - so that there is never a period where they can require the type map and find // it uninitialized. var sourceMethodTypeParameters = sourceMethod.TypeParameters; var allSourceTypeParameters = container.SourceTypeParameters.Concat(sourceMethodTypeParameters); var getTypeMap = new Func<TypeMap>(() => this.TypeMap); _typeParameters = sourceMethodTypeParameters.SelectAsArray( (tp, i, arg) => (TypeParameterSymbol)new EETypeParameterSymbol(this, tp, i, getTypeMap), (object)null); _allTypeParameters = container.TypeParameters.Concat(_typeParameters); this.TypeMap = new TypeMap(NonNullTypesFalseContext.Instance, allSourceTypeParameters, _allTypeParameters); EENamedTypeSymbol.VerifyTypeParameters(this, _typeParameters); var substitutedSourceType = container.SubstitutedSourceType; this.SubstitutedSourceMethod = sourceMethod.AsMember(substitutedSourceType); if (sourceMethod.Arity > 0) { this.SubstitutedSourceMethod = this.SubstitutedSourceMethod.Construct(_typeParameters.As<TypeSymbol>()); } TypeParameterChecker.Check(this.SubstitutedSourceMethod, _allTypeParameters); // Create a map from original parameter to target parameter. var parameterBuilder = ArrayBuilder<ParameterSymbol>.GetInstance(); var substitutedSourceThisParameter = this.SubstitutedSourceMethod.ThisParameter; var substitutedSourceHasThisParameter = (object)substitutedSourceThisParameter != null; if (substitutedSourceHasThisParameter) { _thisParameter = MakeParameterSymbol(0, GeneratedNames.ThisProxyFieldName(), substitutedSourceThisParameter); Debug.Assert(_thisParameter.Type.TypeSymbol == this.SubstitutedSourceMethod.ContainingType); parameterBuilder.Add(_thisParameter); } var ordinalOffset = (substitutedSourceHasThisParameter ? 1 : 0); foreach (var substitutedSourceParameter in this.SubstitutedSourceMethod.Parameters) { var ordinal = substitutedSourceParameter.Ordinal + ordinalOffset; Debug.Assert(ordinal == parameterBuilder.Count); var parameter = MakeParameterSymbol(ordinal, substitutedSourceParameter.Name, substitutedSourceParameter); parameterBuilder.Add(parameter); } _parameters = parameterBuilder.ToImmutableAndFree(); var localsBuilder = ArrayBuilder<LocalSymbol>.GetInstance(); var localsMap = PooledDictionary<LocalSymbol, LocalSymbol>.GetInstance(); foreach (var sourceLocal in sourceLocals) { var local = sourceLocal.ToOtherMethod(this, this.TypeMap); localsMap.Add(sourceLocal, local); localsBuilder.Add(local); } this.Locals = localsBuilder.ToImmutableAndFree(); localsBuilder = ArrayBuilder<LocalSymbol>.GetInstance(); foreach (var sourceLocal in sourceLocalsForBinding) { LocalSymbol local; if (!localsMap.TryGetValue(sourceLocal, out local)) { local = sourceLocal.ToOtherMethod(this, this.TypeMap); localsMap.Add(sourceLocal, local); } localsBuilder.Add(local); } this.LocalsForBinding = localsBuilder.ToImmutableAndFree(); // Create a map from variable name to display class field. var displayClassVariables = PooledDictionary<string, DisplayClassVariable>.GetInstance(); foreach (var pair in sourceDisplayClassVariables) { var variable = pair.Value; var oldDisplayClassInstance = variable.DisplayClassInstance; // Note: we don't call ToOtherMethod in the local case because doing so would produce // a new LocalSymbol that would not be ReferenceEquals to the one in this.LocalsForBinding. var oldDisplayClassInstanceFromLocal = oldDisplayClassInstance as DisplayClassInstanceFromLocal; var newDisplayClassInstance = (oldDisplayClassInstanceFromLocal == null) ? oldDisplayClassInstance.ToOtherMethod(this, this.TypeMap) : new DisplayClassInstanceFromLocal((EELocalSymbol)localsMap[oldDisplayClassInstanceFromLocal.Local]); variable = variable.SubstituteFields(newDisplayClassInstance, this.TypeMap); displayClassVariables.Add(pair.Key, variable); } _displayClassVariables = displayClassVariables.ToImmutableDictionary(); displayClassVariables.Free(); localsMap.Free(); _generateMethodBody = generateMethodBody; } private ParameterSymbol MakeParameterSymbol(int ordinal, string name, ParameterSymbol sourceParameter) { return SynthesizedParameterSymbol.Create(this, sourceParameter.Type, ordinal, sourceParameter.RefKind, name, sourceParameter.RefCustomModifiers); } internal override bool IsMetadataNewSlot(bool ignoreInterfaceImplementationChanges = false) { return false; } internal override bool IsMetadataVirtual(bool ignoreInterfaceImplementationChanges = false) { return false; } internal override bool IsMetadataFinal { get { return false; } } public override MethodKind MethodKind { get { return MethodKind.Ordinary; } } public override string Name { get { return _name; } } public override int Arity { get { return _typeParameters.Length; } } public override bool IsExtensionMethod { get { return false; } } internal override bool HasSpecialName { get { return true; } } internal override System.Reflection.MethodImplAttributes ImplementationAttributes { get { return default(System.Reflection.MethodImplAttributes); } } internal override bool HasDeclarativeSecurity { get { return false; } } public override DllImportData GetDllImportData() { return null; } internal override IEnumerable<Cci.SecurityAttribute> GetSecurityInformation() { throw ExceptionUtilities.Unreachable; } internal override MarshalPseudoCustomAttributeData ReturnValueMarshallingInformation { get { return null; } } internal override bool RequiresSecurityObject { get { return false; } } internal override bool TryGetThisParameter(out ParameterSymbol thisParameter) { thisParameter = null; return true; } public override bool HidesBaseMethodsByName { get { return false; } } public override bool IsVararg { get { return this.SubstitutedSourceMethod.IsVararg; } } public override RefKind RefKind { get { return this.SubstitutedSourceMethod.RefKind; } } public override bool ReturnsVoid { get { return this.ReturnType.SpecialType == SpecialType.System_Void; } } public override bool IsAsync { get { return false; } } public override TypeSymbolWithAnnotations ReturnType { get { if ((object)_lazyReturnType == null) { throw new InvalidOperationException(); } return _lazyReturnType; } } public override ImmutableArray<TypeSymbolWithAnnotations> TypeArguments { get { return GetTypeParametersAsTypeArguments(); } } public override ImmutableArray<TypeParameterSymbol> TypeParameters { get { return _typeParameters; } } public override ImmutableArray<ParameterSymbol> Parameters { get { return _parameters; } } public override ImmutableArray<MethodSymbol> ExplicitInterfaceImplementations { get { return ImmutableArray<MethodSymbol>.Empty; } } public override ImmutableArray<CustomModifier> RefCustomModifiers { get { return ImmutableArray<CustomModifier>.Empty; } } public override Symbol AssociatedSymbol { get { return null; } } internal override ImmutableArray<string> GetAppliedConditionalSymbols() { throw ExceptionUtilities.Unreachable; } internal override Cci.CallingConvention CallingConvention { get { Debug.Assert(this.IsStatic); var cc = Cci.CallingConvention.Default; if (this.IsVararg) { cc |= Cci.CallingConvention.ExtraArguments; } if (this.IsGenericMethod) { cc |= Cci.CallingConvention.Generic; } return cc; } } internal override bool GenerateDebugInfo { get { return false; } } public override Symbol ContainingSymbol { get { return _container; } } public override ImmutableArray<Location> Locations { get { return _locations; } } public override ImmutableArray<SyntaxReference> DeclaringSyntaxReferences { get { throw ExceptionUtilities.Unreachable; } } public override Accessibility DeclaredAccessibility { get { return Accessibility.Internal; } } public override bool IsStatic { get { return true; } } public override bool IsVirtual { get { return false; } } public override bool IsOverride { get { return false; } } public override bool IsAbstract { get { return false; } } public override bool IsSealed { get { return false; } } public override bool IsExtern { get { return false; } } internal override ObsoleteAttributeData ObsoleteAttributeData { get { throw ExceptionUtilities.Unreachable; } } internal ResultProperties ResultProperties { get { return _lazyResultProperties; } } internal override void GenerateMethodBody(TypeCompilationState compilationState, DiagnosticBag diagnostics) { ImmutableArray<LocalSymbol> declaredLocalsArray; var body = _generateMethodBody(this, diagnostics, out declaredLocalsArray, out _lazyResultProperties); var compilation = compilationState.Compilation; _lazyReturnType = TypeSymbolWithAnnotations.Create(CalculateReturnType(compilation, body)); // Can't do this until the return type has been computed. TypeParameterChecker.Check(this, _allTypeParameters); if (diagnostics.HasAnyErrors()) { return; } DiagnosticsPass.IssueDiagnostics(compilation, body, diagnostics, this); if (diagnostics.HasAnyErrors()) { return; } // Check for use-site diagnostics (e.g. missing types in the signature). DiagnosticInfo useSiteDiagnosticInfo = null; this.CalculateUseSiteDiagnostic(ref useSiteDiagnosticInfo); if (useSiteDiagnosticInfo != null && useSiteDiagnosticInfo.Severity == DiagnosticSeverity.Error) { diagnostics.Add(useSiteDiagnosticInfo, this.Locations[0]); return; } try { var declaredLocals = PooledHashSet<LocalSymbol>.GetInstance(); try { // Rewrite local declaration statement. body = (BoundStatement)LocalDeclarationRewriter.Rewrite( compilation, _container, declaredLocals, body, declaredLocalsArray, diagnostics); // Verify local declaration names. foreach (var local in declaredLocals) { Debug.Assert(local.Locations.Length > 0); var name = local.Name; if (name.StartsWith("$", StringComparison.Ordinal)) { diagnostics.Add(ErrorCode.ERR_UnexpectedCharacter, local.Locations[0], name[0]); return; } } // Rewrite references to placeholder "locals". body = (BoundStatement)PlaceholderLocalRewriter.Rewrite(compilation, _container, declaredLocals, body, diagnostics); if (diagnostics.HasAnyErrors()) { return; } } finally { declaredLocals.Free(); } var syntax = body.Syntax; var statementsBuilder = ArrayBuilder<BoundStatement>.GetInstance(); statementsBuilder.Add(body); // Insert an implicit return statement if necessary. if (body.Kind != BoundKind.ReturnStatement) { statementsBuilder.Add(new BoundReturnStatement(syntax, RefKind.None, expressionOpt: null)); } var localsSet = PooledHashSet<LocalSymbol>.GetInstance(); try { var localsBuilder = ArrayBuilder<LocalSymbol>.GetInstance(); foreach (var local in this.LocalsForBinding) { Debug.Assert(!localsSet.Contains(local)); localsBuilder.Add(local); localsSet.Add(local); } foreach (var local in this.Locals) { if (localsSet.Add(local)) { localsBuilder.Add(local); } } body = new BoundBlock(syntax, localsBuilder.ToImmutableAndFree(), statementsBuilder.ToImmutableAndFree()) { WasCompilerGenerated = true }; Debug.Assert(!diagnostics.HasAnyErrors()); Debug.Assert(!body.HasErrors); bool sawLambdas; bool sawLocalFunctions; bool sawAwaitInExceptionHandler; ImmutableArray<SourceSpan> dynamicAnalysisSpans = ImmutableArray<SourceSpan>.Empty; body = LocalRewriter.Rewrite( compilation: this.DeclaringCompilation, method: this, methodOrdinal: _methodOrdinal, containingType: _container, statement: body, compilationState: compilationState, previousSubmissionFields: null, allowOmissionOfConditionalCalls: false, instrumentForDynamicAnalysis: false, debugDocumentProvider: null, dynamicAnalysisSpans: ref dynamicAnalysisSpans, diagnostics: diagnostics, sawLambdas: out sawLambdas, sawLocalFunctions: out sawLocalFunctions, sawAwaitInExceptionHandler: out sawAwaitInExceptionHandler); Debug.Assert(!sawAwaitInExceptionHandler); Debug.Assert(dynamicAnalysisSpans.Length == 0); if (body.HasErrors) { return; } // Variables may have been captured by lambdas in the original method // or in the expression, and we need to preserve the existing values of // those variables in the expression. This requires rewriting the variables // in the expression based on the closure classes from both the original // method and the expression, and generating a preamble that copies // values into the expression closure classes. // // Consider the original method: // static void M() // { // int x, y, z; // ... // F(() => x + y); // } // and the expression in the EE: "F(() => x + z)". // // The expression is first rewritten using the closure class and local <1> // from the original method: F(() => <1>.x + z) // Then lambda rewriting introduces a new closure class that includes // the locals <1> and z, and a corresponding local <2>: F(() => <2>.<1>.x + <2>.z) // And a preamble is added to initialize the fields of <2>: // <2> = new <>c__DisplayClass0(); // <2>.<1> = <1>; // <2>.z = z; // Rewrite "this" and "base" references to parameter in this method. // Rewrite variables within body to reference existing display classes. body = (BoundStatement)CapturedVariableRewriter.Rewrite( this.GenerateThisReference, compilation.Conversions, _displayClassVariables, body, diagnostics); if (body.HasErrors) { Debug.Assert(false, "Please add a test case capturing whatever caused this assert."); return; } if (diagnostics.HasAnyErrors()) { return; } if (sawLambdas || sawLocalFunctions) { var closureDebugInfoBuilder = ArrayBuilder<ClosureDebugInfo>.GetInstance(); var lambdaDebugInfoBuilder = ArrayBuilder<LambdaDebugInfo>.GetInstance(); body = LambdaRewriter.Rewrite( loweredBody: body, thisType: this.SubstitutedSourceMethod.ContainingType, thisParameter: _thisParameter, method: this, methodOrdinal: _methodOrdinal, substitutedSourceMethod: this.SubstitutedSourceMethod.OriginalDefinition, closureDebugInfoBuilder: closureDebugInfoBuilder, lambdaDebugInfoBuilder: lambdaDebugInfoBuilder, slotAllocatorOpt: null, compilationState: compilationState, diagnostics: diagnostics, assignLocals: localsSet); // we don't need this information: closureDebugInfoBuilder.Free(); lambdaDebugInfoBuilder.Free(); } } finally { localsSet.Free(); } // Insert locals from the original method, // followed by any new locals. var block = (BoundBlock)body; var localBuilder = ArrayBuilder<LocalSymbol>.GetInstance(); foreach (var local in this.Locals) { Debug.Assert(!(local is EELocalSymbol) || (((EELocalSymbol)local).Ordinal == localBuilder.Count)); localBuilder.Add(local); } foreach (var local in block.Locals) { if (local is EELocalSymbol oldLocal) { Debug.Assert(localBuilder[oldLocal.Ordinal] == oldLocal); continue; } localBuilder.Add(local); } body = block.Update(localBuilder.ToImmutableAndFree(), block.LocalFunctions, block.Statements); TypeParameterChecker.Check(body, _allTypeParameters); compilationState.AddSynthesizedMethod(this, body); } catch (BoundTreeVisitor.CancelledByStackGuardException ex) { ex.AddAnError(diagnostics); } } private BoundExpression GenerateThisReference(SyntaxNode syntax) { var thisProxy = CompilationContext.GetThisProxy(_displayClassVariables); if (thisProxy != null) { return thisProxy.ToBoundExpression(syntax); } if ((object)_thisParameter != null) { var typeNameKind = GeneratedNames.GetKind(_thisParameter.Type.Name); if (typeNameKind != GeneratedNameKind.None && typeNameKind != GeneratedNameKind.AnonymousType) { Debug.Assert(typeNameKind == GeneratedNameKind.LambdaDisplayClass || typeNameKind == GeneratedNameKind.StateMachineType, $"Unexpected typeNameKind '{typeNameKind}'"); return null; } return new BoundParameter(syntax, _thisParameter); } return null; } private static TypeSymbol CalculateReturnType(CSharpCompilation compilation, BoundStatement bodyOpt) { if (bodyOpt == null) { // If the method doesn't do anything, then it doesn't return anything. return compilation.GetSpecialType(SpecialType.System_Void); } switch (bodyOpt.Kind) { case BoundKind.ReturnStatement: return ((BoundReturnStatement)bodyOpt).ExpressionOpt.Type; case BoundKind.ExpressionStatement: case BoundKind.LocalDeclaration: case BoundKind.MultipleLocalDeclarations: return compilation.GetSpecialType(SpecialType.System_Void); default: throw ExceptionUtilities.UnexpectedValue(bodyOpt.Kind); } } internal override int CalculateLocalSyntaxOffset(int localPosition, SyntaxTree localTree) { return localPosition; } } }
40.232525
161
0.571606
[ "Apache-2.0" ]
Mongooz/roslyn
src/ExpressionEvaluator/CSharp/Source/ExpressionCompiler/Symbols/EEMethodSymbol.cs
28,205
C#
using System.Collections.Generic; using System.ServiceModel.Syndication; using Sdl.Web.Common.Configuration; using Sdl.Web.Common.Models; using System; using Sdl.Web.Common.Interfaces; namespace Sdl.Web.Tridion.Tests.Models { [SemanticEntity(SchemaOrgVocabulary, "DataDownload", Prefix = "s", Public = true)] [Serializable] public class Download : MediaItem, ISyndicationFeedItemProvider { [SemanticProperty("s:name")] [SemanticProperty("s:description")] public string Description { get; set; } /// <summary> /// Renders an HTML representation of the Media Item. /// </summary> /// <param name="widthFactor">The factor to apply to the width - can be % (eg "100%") or absolute (eg "120").</param> /// <param name="aspect">The aspect ratio to apply.</param> /// <param name="cssClass">Optional CSS class name(s) to apply.</param> /// <param name="containerSize">The size (in grid column units) of the containing element.</param> /// <returns>The HTML representation.</returns> /// <remarks> /// This method is used by the <see cref="IRichTextFragment.ToHtml()"/> implementation in <see cref="MediaItem"/> and by the HtmlHelperExtensions.Media implementation. /// Both cases should be avoided, since HTML rendering should be done in View code rather than in Model code. /// </remarks> public override string ToHtml(string widthFactor, double aspect = 0, string cssClass = null, int containerSize = 0) { if (string.IsNullOrEmpty(Url)) return string.Empty; string descriptionHtml = string.IsNullOrEmpty(Description) ? null : string.Format("<small>{0}</small>", Description); return string.Format(@" <div class=""download-list""> <i class=""fa {0}""></i> <div> <a href=""{1}"">{2}</a> <small class=""size"">({3})</small> {4} </div> </div>", GetIconClass(), Url, FileName, GetFriendlyFileSize(), descriptionHtml); } /// <summary> /// Gets the default View. /// </summary> /// <param name="localization">The context Localization</param> /// <remarks> /// This makes it possible possible to render "embedded" Download Models using the Html.DxaEntity method. /// </remarks> public override MvcData GetDefaultView(ILocalization localization) { return new MvcData("Core:Download"); } #region ISyndicationFeedItemProvider members /// <summary> /// Extracts syndication feed items. /// </summary> /// <param name="localization">The context <see cref="ILocalization"/>.</param> /// <returns>A single syndication feed item containing information extracted from this <see cref="Teaser"/>.</returns> public IEnumerable<SyndicationItem> ExtractSyndicationFeedItems(ILocalization localization) { Link downloadLink = new Link {Url = Url}; return new[] { CreateSyndicationItem(FileName, Description, downloadLink, null, localization) }; } #endregion } }
45.930556
175
0.608709
[ "Apache-2.0" ]
ronnqvistandreas/dxa-web-application-dotnet
Sdl.Web.Tridion.Tests/Models/Entity/Download.cs
3,309
C#
using System; using System.IO; using System.Linq; using System.Threading.Tasks; using FluentAssertions; using joseki.db.entities; using Microsoft.VisualStudio.TestTools.UnitTesting; using webapp.Handlers; using webapp.Models; namespace tests.handlers { [TestClass] public class GetKnowledgebaseItemsHandlerTests { private static readonly string BaseTestPath = "./testfiles/"; [TestMethod] public async Task GetAllReturnsNothingForEmptyDatabase() { // Prepare var (handler, path) = await this.getUniqueHandlerAsync(); try { // Act var items = await handler.GetAll(); // Assert items.Should().BeEmpty(); } catch (Exception e) { throw e; } finally { // Cleanup this.cleanupHandlerFolder(path); } } [TestMethod] public async Task GetAllReturnsAllItemsFromTheDatabase() { // Prepare var (handler, path) = await this.getUniqueHandlerAsync(); try { // Arrange var itemsCount = new Random().Next(5, 10); var entities = Enumerable .Range(1, itemsCount) .Select(i => new KnowledgebaseItem { Id = Guid.NewGuid().ToString(), Content = Guid.NewGuid().ToString() }); // Act foreach (var item in entities) { await handler.AddItem(item); } // Assert var items = await handler.GetAll(); items.Should().HaveCount(itemsCount); } catch (Exception e) { throw e; } finally { // Cleanup this.cleanupHandlerFolder(path); } } [TestMethod] public async Task GetItemsByIdsReturnsOnlyRequestedIds() { // Prepare var (handler, path) = await this.getUniqueHandlerAsync(); try { // Arrange var itemsCount = new Random().Next(5, 10); var entities = Enumerable .Range(1, itemsCount) .Select(i => new KnowledgebaseItem { Id = Guid.NewGuid().ToString(), Content = Guid.NewGuid().ToString() }) .ToArray(); foreach (var item in entities) { await handler.AddItem(item); } // Act var item1 = entities[1]; var item3 = entities[3]; var items = await handler.GetItemsByIds(new[] { item1.Id, item3.Id }); // Assert items.Should().HaveCount(2); items.FirstOrDefault(i => i.Id == item1.Id).Should().NotBeNull(); items.FirstOrDefault(i => i.Id == item3.Id).Should().NotBeNull(); } catch (Exception e) { throw e; } finally { // Cleanup this.cleanupHandlerFolder(path); } } [TestMethod] public async Task GetItemByIdReturnsCorrectEntry() { // Prepare var (handler, path) = await this.getUniqueHandlerAsync(); try { // Arrange var itemsCount = new Random().Next(5, 10); var entities = Enumerable .Range(1, itemsCount) .Select(i => new KnowledgebaseItem { Id = Guid.NewGuid().ToString(), Content = Guid.NewGuid().ToString() }) .ToArray(); foreach (var item in entities) { await handler.AddItem(item); } // Act var expectedItem = entities[2]; var actualItem = await handler.GetItemById(expectedItem.Id); // Assert actualItem.Id.Should().Be(expectedItem.Id); actualItem.Content.Should().Be(expectedItem.Content); } catch (Exception e) { throw e; } finally { // Cleanup this.cleanupHandlerFolder(path); } } [TestMethod] public async Task GetItemByIdReturnsNotFoundRecordForWrongId() { // Prepare var (handler, path) = await this.getUniqueHandlerAsync(); try { // Arrange var itemsCount = new Random().Next(5, 10); var entities = Enumerable .Range(1, itemsCount) .Select(i => new KnowledgebaseItem { Id = Guid.NewGuid().ToString(), Content = Guid.NewGuid().ToString() }) .ToArray(); foreach (var testitem in entities) { await handler.AddItem(testitem); } // Act var item = await handler.GetItemById(Guid.NewGuid().ToString()); // Assert item.Should().Be(KnowledgebaseItem.NotFound); } catch (Exception e) { throw e; } finally { // Cleanup this.cleanupHandlerFolder(path); } } [TestMethod] public async Task GetMetadataItemsReturnsOnlyMetadataRecords() { // Prepare var (handler, path) = await this.getUniqueHandlerAsync(); try { // Arrange var itemsCount = new Random().Next(5, 10); var expectedItems = new[] { new KnowledgebaseItem { Id = $"metadata.{Guid.NewGuid()}", Content = Guid.NewGuid().ToString() }, new KnowledgebaseItem { Id = $"metadata.{Guid.NewGuid()}", Content = Guid.NewGuid().ToString() }, }; var entities = Enumerable .Range(1, itemsCount) .Select(i => new KnowledgebaseItem { Id = Guid.NewGuid().ToString(), Content = Guid.NewGuid().ToString() }) .ToList(); foreach (var testitem in entities.Concat(expectedItems)) { await handler.AddItem(testitem); } // Act var actualItems = await handler.GetMetadataItems(); // Assert actualItems.Should().HaveCount(expectedItems.Length); foreach (var actualItem in actualItems) { var expectedItem = expectedItems.First(i => i.Id == actualItem.Id); actualItem.Content.Should().Be(expectedItem.Content); } } catch (Exception e) { throw e; } finally { // Cleanup this.cleanupHandlerFolder(path); } } private async Task<(GetKnowledgebaseItemsHandler, string)> getUniqueHandlerAsync() { await using var context = JosekiTestsDb.CreateUniqueContext(); var path = Path.Combine(BaseTestPath, Guid.NewGuid().ToString()); if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } var handler = new GetKnowledgebaseItemsHandler(context, path); return (handler, path); } private void cleanupHandlerFolder(string handlerRootPath) { if (Directory.Exists(handlerRootPath)) { Directory.Delete(handlerRootPath, true); } } } }
31.033088
129
0.447577
[ "Apache-2.0" ]
deepnetworkgmbh/joseki
src/backend/joseki.be/tests/handlers/GetKnowledgebaseItemsHandlerTests.cs
8,443
C#
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("DatabaseMigration_7._7._0")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("DatabaseMigration_7._7._0")] [assembly: AssemblyCopyright("Copyright © 2018")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("2580a7f9-834e-4d5d-9cb4-3d0ef885c9a2")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]
38.416667
84
0.750542
[ "MIT" ]
nvdeveloper/UmbracoUpgrade-7.7.0-WordAround
src/DatabaseMigration_7.7.0/Properties/AssemblyInfo.cs
1,386
C#
using System; using System.Linq; using Telerik.Data.Core; using Telerik.UI.Xaml.Controls.Grid.Primitives; using Windows.Foundation; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; namespace Telerik.UI.Xaml.Controls.Grid.View { internal class XamlScrollableAdornerLayer : SharedUILayer { private DataGridAutoDataLoadingControl loadingControl; internal IDataStatusListener Listener { get { if (this.loadingControl == null) { this.loadingControl = new DataGridAutoDataLoadingControl(); } return this.loadingControl; } } internal void OnOwnerArranging(Rect rect) { if (this.loadingControl != null) { var arrangeRect = new Rect(rect.X, rect.Bottom - this.loadingControl.DesiredSize.Height, rect.Width, this.loadingControl.DesiredSize.Height); Canvas.SetTop(this.loadingControl, arrangeRect.Top); Canvas.SetLeft(this.loadingControl, arrangeRect.Left); this.loadingControl.Arrange(arrangeRect); } } protected internal override void DetachUI(Panel parent) { this.RemoveVisualChild(this.Listener as UIElement); base.DetachUI(parent); } protected internal override void AttachUI(Panel parent) { base.AttachUI(parent); var control = this.Listener as UIElement; if (control != null) { this.AddVisualChild(control); control.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity)); } } } }
29.283333
157
0.593625
[ "Apache-2.0" ]
ChristianGutman/UI-For-UWP
Controls/Grid/Grid.UWP/View/Layers/XamlScrollableAdornerLayer.cs
1,759
C#
using System; using System.Runtime.InteropServices; using System.Windows.Forms; namespace Autoclicker { public partial class Form1 : Form { static int hHook = 0; NativeMethods.HookProc MouseHookProcedure; public Form1() { InitializeComponent(); } private void SetupHook() { MouseHookProcedure = new NativeMethods.HookProc(MouseHookProc); hHook = HookHelpers.SetHook(MouseHookProcedure); } private void Form1_Load(object sender, EventArgs e) { SetupHook(); } public int MouseHookProc(int nCode, IntPtr wParam, IntPtr lParam) { Input.MouseHookStruct data = (Input.MouseHookStruct) Marshal.PtrToStructure(lParam, typeof(Input.MouseHookStruct)); if ((Input.MouseMessages)wParam == Input.MouseMessages.WM_MBUTTONUP) StartStopClicker(); return NativeMethods.CallNextHookEx(hHook, nCode, wParam, lParam); } private void StartStopClicker() { timer.Enabled = !timer.Enabled; } private void timer_Tick(object sender, EventArgs e) { Input.DoOneClick(); } private void Form1_FormClosing(object sender, FormClosingEventArgs e) { Input.UnhookWindowsHookEx(hHook); } } }
26.660377
80
0.596603
[ "MIT" ]
jborza/autoclicker-adcomm
Autoclicker/Form1.cs
1,415
C#
// Copyright (c) 2017 Trevor Redfern // // This software is released under the MIT License. // https://opensource.org/licenses/MIT namespace SilverNeedle.Equipment { using SilverNeedle.Treasure; using SilverNeedle.Serialization; public class Gear : IGear, IGatewayObject { public string Name { get; protected set; } public float Weight { get; protected set; } public int Value { get; protected set; } public bool GroupSimilar { get; protected set; } public Gear(IObjectStore data) { Name = data.GetString("name"); //ShortLog.DebugFormat("Loading Gear: {0}", Name); Weight = data.GetFloat("weight"); Value = data.GetString("value").ToCoinValue(); GroupSimilar = true; } public Gear(string name, int value, float weight) { Name = name; Value = value; Weight = weight; } public bool Matches(string name) { return Name.EqualsIgnoreCase(name); } } }
27.2
62
0.575368
[ "MIT" ]
shortlegstudio/silverneedle-web
silverneedle/lib/Equipment/Gear.cs
1,088
C#