CSLA.NET
5.4.2
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
ObjectCloner.cs
Go to the documentation of this file.
1
//-----------------------------------------------------------------------
2
// <copyright file="ObjectCloner.cs" company="Marimer LLC">
3
// Copyright (c) Marimer LLC. All rights reserved.
4
// Website: https://cslanet.com
5
// </copyright>
6
// <summary>This class provides an implementation of a deep</summary>
7
//-----------------------------------------------------------------------
8
using
Csla
.
Serialization
;
9
using
System;
10
using
System.IO;
11
12
namespace
Csla.Core
13
{
19
public
static
class
ObjectCloner
20
{
40
public
static
object
Clone(
object
obj)
41
{
42
using
(MemoryStream buffer =
new
MemoryStream())
43
{
44
ISerializationFormatter
formatter =
45
SerializationFormatterFactory.GetFormatter();
46
formatter.
Serialize
(buffer, obj);
47
buffer.Position = 0;
48
object
temp = formatter.
Deserialize
(buffer);
49
return
temp;
50
}
51
}
52
}
53
}
Csla.Serialization.ISerializationFormatter
Defines an object that can serialize and deserialize object graphs.
Definition:
ISerializationFormatter.cs:17
Csla.Serialization.ISerializationFormatter.Serialize
void Serialize(System.IO.Stream serializationStream, object graph)
Converts an object graph into a byte stream.
Csla.Serialization.ISerializationFormatter.Deserialize
object Deserialize(System.IO.Stream serializationStream)
Converts a serialization stream into an object graph.
Csla.Core
Definition:
AddedNewEventArgs.cs:11
Csla.Serialization
Definition:
BinaryFormatterWrapper.cs:13
Csla
Definition:
Csla.AspNetCore.Shared/ApplicationContextManager.cs:16
Generated by
1.9.2