using System.Reflection.Emit;
using System.Security;
+#if !NO_DYNAMIC_CODEGEN
[Fx.Tag.SecurityNote(Miscellaneous = "RequiresReview (Critical) - works on CodeGenerator objects, which require Critical access.")]
class BitFlagsGenerator
{
}
}
+#endif
}
using System;
using System.Collections.Generic;
using System.Reflection;
+#if !NO_DYNAMIC_CODEGEN
using System.Reflection.Emit;
+#endif
using System.Runtime;
using System.Runtime.Serialization.Diagnostics.Application;
using System.Security;
delegate object JsonFormatCollectionReaderDelegate(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContextComplexJson context, XmlDictionaryString emptyDictionaryString, XmlDictionaryString itemName, CollectionDataContract collectionContract);
delegate void JsonFormatGetOnlyCollectionReaderDelegate(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContextComplexJson context, XmlDictionaryString emptyDictionaryString, XmlDictionaryString itemName, CollectionDataContract collectionContract);
- sealed class JsonFormatReaderGenerator
+ sealed partial class JsonFormatReaderGenerator
{
[Fx.Tag.SecurityNote(Critical = "Holds instance of CriticalHelper which keeps state that was produced within an assert.")]
[SecurityCritical]
}
}
+#if !NO_DYNAMIC_CODEGEN
[Fx.Tag.SecurityNote(Miscellaneous = "RequiresReview - handles all aspects of IL generation including initializing the DynamicMethod."
+ "Changes to how IL generated could affect how data is deserialized and what gets access to data, "
+ "therefore we mark it for review so that changes to generation logic are reviewed.")]
- class CriticalHelper
+ partial class CriticalHelper
{
CodeGenerator ilg;
LocalBuilder objectLocal;
UsingCustomParse
}
}
+#endif
}
}
using System;
using System.Collections;
using System.Reflection;
+#if !NO_DYNAMIC_CODEGEN
using System.Reflection.Emit;
+#endif
using System.Runtime.Serialization.Diagnostics.Application;
using System.Security;
using System.Security.Permissions;
delegate void JsonFormatClassWriterDelegate(XmlWriterDelegator xmlWriter, object obj, XmlObjectSerializerWriteContextComplexJson context, ClassDataContract dataContract, XmlDictionaryString[] memberNames);
delegate void JsonFormatCollectionWriterDelegate(XmlWriterDelegator xmlWriter, object obj, XmlObjectSerializerWriteContextComplexJson context, CollectionDataContract dataContract);
- class JsonFormatWriterGenerator
+ partial class JsonFormatWriterGenerator
{
[Fx.Tag.SecurityNote(Critical = "Holds instance of CriticalHelper which keeps state that was produced within an assert.")]
[SecurityCritical]
}
}
+#if !NO_DYNAMIC_CODEGEN
[Fx.Tag.SecurityNote(Miscellaneous = "RequiresReview - handles all aspects of IL generation including initializing the DynamicMethod."
+ "Changes to how IL generated could affect how data is deserialized and what gets access to data, "
+ "therefore we mark it for review so that changes to generation logic are reviewed.")]
- class CriticalHelper
+ partial class CriticalHelper
{
CodeGenerator ilg;
ArgBuilder xmlWriterArg;
ilg.Call(xmlWriterArg, JsonFormatGeneratorStatics.WriteEndElementMethod);
}
}
+#endif
}
}
#if USE_REFEMIT
public sealed class XmlDataContract : DataContract
#else
- internal sealed class XmlDataContract : DataContract
+ internal sealed partial class XmlDataContract : DataContract
#endif
{
[Fx.Tag.SecurityNote(Critical = "Holds instance of CriticalHelper which keeps state that is cached statically for serialization."
}
}
+#if !NO_DYNAMIC_CODEGEN
[Fx.Tag.SecurityNote(Critical = "Calls CodeGenerator.BeginMethod which is SecurityCritical.",
Safe = "Self-contained: returns the delegate to the generated IL but otherwise all IL generation is self-contained here.")]
[SecuritySafeCritical]
ilg.Ret();
return (CreateXmlSerializableDelegate)ilg.EndMethod();
}
+#endif
[Fx.Tag.SecurityNote(Miscellaneous = "RequiresReview - Calculates whether this Xml type requires MemberAccessPermission for deserialization."
+ " Since this information is used to determine whether to give the generated code access"
using System;
using System.Collections.Generic;
using System.Reflection;
+#if !NO_DYNAMIC_CODEGEN
using System.Reflection.Emit;
+#endif
using System.Runtime.Serialization.Diagnostics.Application;
using System.Security;
using System.Security.Permissions;
internal delegate object XmlFormatCollectionReaderDelegate(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context, XmlDictionaryString itemName, XmlDictionaryString itemNamespace, CollectionDataContract collectionContract);
internal delegate void XmlFormatGetOnlyCollectionReaderDelegate(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context, XmlDictionaryString itemName, XmlDictionaryString itemNamespace, CollectionDataContract collectionContract);
- internal sealed class XmlFormatReaderGenerator
+ internal sealed partial class XmlFormatReaderGenerator
#endif
{
[Fx.Tag.SecurityNote(Critical = "Holds instance of CriticalHelper which keeps state that was produced within an assert.")]
}
}
+#if !NO_DYNAMIC_CODEGEN
[Fx.Tag.SecurityNote(Miscellaneous = "RequiresReview - Handles all aspects of IL generation including initializing the DynamicMethod."
+ " Changes to how IL generated could affect how data is deserialized and what gets access to data,"
+ " therefore we mark it for review so that changes to generation logic are reviewed.")]
- class CriticalHelper
+ partial class CriticalHelper
{
CodeGenerator ilg;
LocalBuilder objectLocal;
DemandMemberAccessPermission(memberAccessFlag);
collectionContractArg = ilg.GetArg(4);
return ilg;
- }
+ }
void InitArgs()
{
}
}
+#endif
[Fx.Tag.SecurityNote(Critical = "Elevates by calling GetUninitializedObject which has a LinkDemand.",
Safe = "Marked as such so that it's callable from transparent generated IL. Takes id as parameter which "
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
+#if !NO_DYNAMIC_CODEGEN
using System.Reflection.Emit;
+#endif
using System.Security;
using System.Security.Permissions;
using System.Runtime.Serialization.Diagnostics.Application;
internal delegate void XmlFormatClassWriterDelegate(XmlWriterDelegator xmlWriter, object obj, XmlObjectSerializerWriteContext context, ClassDataContract dataContract);
internal delegate void XmlFormatCollectionWriterDelegate(XmlWriterDelegator xmlWriter, object obj, XmlObjectSerializerWriteContext context, CollectionDataContract dataContract);
- internal sealed class XmlFormatWriterGenerator
+ internal sealed partial class XmlFormatWriterGenerator
#endif
{
[Fx.Tag.SecurityNote(Critical = "Holds instance of CriticalHelper which keeps state that was produced within an assert.")]
}
}
+#if !NO_DYNAMIC_CODEGEN
[Fx.Tag.SecurityNote(Miscellaneous = "RequiresReview - Handles all aspects of IL generation including initializing the DynamicMethod."
+ " Changes to how IL generated could affect how data is serialized and what gets access to data,"
+ " therefore we mark it for review so that changes to generation logic are reviewed.")]
- class CriticalHelper
+ partial class CriticalHelper
{
CodeGenerator ilg;
ArgBuilder xmlWriterArg;
return prefix;
}
#endif
-
}
+#endif
}
}