public static EventInformation Deserialize(byte[] data) { if (data == null) { return(null); } MemoryStream stream = null; EventInformation result = null; try { stream = new MemoryStream(data, writable: false); BinaryFormatter bFormatter = new BinaryFormatter(); RevertImpersonationContext.Run(delegate { EventInformation eventInformation = (EventInformation)bFormatter.Deserialize(stream); eventInformation.m_changed = false; result = eventInformation; }); } finally { if (stream != null) { stream.Close(); } } return(result); }
private RenderingInfoRoot Deserialize(Microsoft.ReportingServices.ReportProcessing.ReportProcessing.GetReportChunk getChunkCallback) { Stream stream = null; try { stream = getChunkCallback(m_chunkName, Microsoft.ReportingServices.ReportProcessing.ReportProcessing.ReportChunkTypes.Other, out string _); RenderingInfoRoot result = null; if (stream != null) { BinaryFormatter bFormatter = new BinaryFormatter(); RevertImpersonationContext.Run(delegate { result = (RenderingInfoRoot)bFormatter.Deserialize(stream); }); } return(result); } catch (SerializationException) { return(null); } finally { if (stream != null) { stream.Close(); } } }
private RenderingInfoRoot Deserialize(AspNetCore.ReportingServices.ReportProcessing.ReportProcessing.GetReportChunk getChunkCallback) { Stream stream = null; try { string text = default(string); stream = getChunkCallback(this.m_chunkName, AspNetCore.ReportingServices.ReportProcessing.ReportProcessing.ReportChunkTypes.Other, out text); RenderingInfoRoot result = null; if (stream != null) { BinaryFormatter bFormatter = new BinaryFormatter(); //result = (RenderingInfoRoot)bFormatter.Deserialize(stream); //todo: can delete? RevertImpersonationContext.Run(delegate { result = (RenderingInfoRoot)bFormatter.Deserialize(stream); }); } return(result); } catch (SerializationException) { return(null); } finally { if (stream != null) { stream.Close(); } } }
internal byte[] Compile(Report report, AppDomain compilationTempAppDomain, bool refusePermissions) { byte[] result = null; RevertImpersonationContext.Run(delegate { result = InternalCompile(report, compilationTempAppDomain, refusePermissions); }); return(result); }
public byte[] Compile(Report report, AppDomain compilationTempAppDomain, bool refusePermissions) { byte[] result = null;//this.InternalCompile(report, compilationTempAppDomain, refusePermissions); //todo: can delete? RevertImpersonationContext.Run(delegate { result = this.InternalCompile(report, compilationTempAppDomain, refusePermissions); }); return(result); }
static IntermediateFormatVersion() { m_current_major = 10; m_current_minor = 8; int current_build = 0; RevertImpersonationContext.Run(delegate { current_build = EncodeFileVersion(FileVersionInfo.GetVersionInfo(typeof(IntermediateFormatVersion).Assembly.Location)); }); m_current_build = current_build; }
static IntermediateFormatVersion() { m_Declaration = GetDeclaration(); int majorVersion = PersistenceConstants.MajorVersion; int minorVersion = PersistenceConstants.MinorVersion; int current_build = 0; RevertImpersonationContext.Run(delegate { current_build = EncodeFileVersion(FileVersionInfo.GetVersionInfo(typeof(IntermediateFormatVersion).Assembly.Location)); }); m_current = new IntermediateFormatVersion(majorVersion, minorVersion, current_build); }
static IntermediateFormatVersion() { IntermediateFormatVersion.m_current_major = 10; IntermediateFormatVersion.m_current_minor = 8; int current_build = 0; //todo: can delete? RevertImpersonationContext.Run(delegate { current_build = IntermediateFormatVersion.EncodeFileVersion(FileVersionInfo.GetVersionInfo(typeof(IntermediateFormatVersion).Assembly.Location)); }); //current_build = IntermediateFormatVersion.EncodeFileVersion(FileVersionInfo.GetVersionInfo(typeof(IntermediateFormatVersion).Assembly.Location)); IntermediateFormatVersion.m_current_build = current_build; }
internal byte[] Compile(IExpressionHostAssemblyHolder expressionHostAssemblyHolder, AppDomain compilationTempAppDomain, bool refusePermissions, PublishingVersioning versioning) { byte[] result = null; if (m_builder.HasExpressions && versioning.IsRdlFeatureRestricted(RdlFeatures.ComplexExpression)) { m_errorContext.Register(ProcessingErrorCode.rsInvalidComplexExpressionInReport, Severity.Error, Microsoft.ReportingServices.ReportProcessing.ObjectType.Report, "Report", "Body"); } else { m_expressionHostAssemblyHolder = expressionHostAssemblyHolder; RevertImpersonationContext.Run(delegate { result = InternalCompile(compilationTempAppDomain, refusePermissions); }); } return(result); }
public byte[] Compile(IExpressionHostAssemblyHolder expressionHostAssemblyHolder, AppDomain compilationTempAppDomain, bool refusePermissions, PublishingVersioning versioning) { byte[] result = null; if (this.m_builder.HasExpressions && versioning.IsRdlFeatureRestricted(RdlFeatures.ComplexExpression)) { this.m_errorContext.Register(ProcessingErrorCode.rsInvalidComplexExpressionInReport, Severity.Error, ReportProcessing.ObjectType.Report, "Report", "Body", new string[0]); } else { this.m_expressionHostAssemblyHolder = expressionHostAssemblyHolder; //todo: can delete? RevertImpersonationContext.Run(delegate { result = this.InternalCompile(compilationTempAppDomain, refusePermissions); }); // result = this.InternalCompile(compilationTempAppDomain, refusePermissions); } return(result); }
static IntermediateFormatVersion() { m_current_major = 10; m_current_minor = 8; int current_build = 0; RevertImpersonationContext.Run(delegate { string pathForVersion = typeof(IntermediateFormatVersion).Assembly.Location; if (String.IsNullOrEmpty(pathForVersion)) { pathForVersion = System.Reflection.Assembly.GetExecutingAssembly().Location; } if (String.IsNullOrEmpty(pathForVersion)) { pathForVersion = Process.GetCurrentProcess().MainModule.FileName; } current_build = EncodeFileVersion(FileVersionInfo.GetVersionInfo(pathForVersion)); }); m_current_build = current_build; }