You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2016/07/20 09:29:38 UTC
[27/45] ignite git commit: .NET: Move internal UserSerializerProxy to
the appropriate namespace
.NET: Move internal UserSerializerProxy to the appropriate namespace
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/96f25aef
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/96f25aef
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/96f25aef
Branch: refs/heads/ignite-1232-1
Commit: 96f25aefd0e04f8f95383b5c2c6bcb3afc7e9757
Parents: 6cba20f
Author: Pavel Tupitsyn <pt...@apache.org>
Authored: Tue Jul 19 14:00:31 2016 +0300
Committer: Pavel Tupitsyn <pt...@apache.org>
Committed: Tue Jul 19 14:00:31 2016 +0300
----------------------------------------------------------------------
.../Apache.Ignite.Core.csproj | 2 +-
.../Binary/UserSerializerProxy.cs | 68 --------------------
.../Impl/Binary/UserSerializerProxy.cs | 68 ++++++++++++++++++++
3 files changed, 69 insertions(+), 69 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/96f25aef/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj b/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
index 57f89a6..fac94a8 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
@@ -89,7 +89,6 @@
<Compile Include="Impl\Binary\BinaryReflectiveSerializerInternal.cs" />
<Compile Include="Impl\Binary\IBinarySerializerInternal.cs" />
<Compile Include="Binary\Package-Info.cs" />
- <Compile Include="Binary\UserSerializerProxy.cs" />
<Compile Include="Cache\Affinity\AffinityFunctionBase.cs" />
<Compile Include="Cache\Affinity\AffinityKey.cs" />
<Compile Include="Cache\Affinity\AffinityKeyMappedAttribute.cs" />
@@ -164,6 +163,7 @@
<Compile Include="Impl\Binary\DateTimeSerializer.cs" />
<Compile Include="Impl\Binary\SerializableSerializer.cs" />
<Compile Include="Impl\Binary\BinaryWriterExtensions.cs" />
+ <Compile Include="Impl\Binary\UserSerializerProxy.cs" />
<Compile Include="Impl\Cache\Affinity\AffinityFunctionSerializer.cs" />
<Compile Include="Impl\Cache\Affinity\PlatformAffinityFunction.cs" />
<Compile Include="Impl\Common\ObjectInfoHolder.cs" />
http://git-wip-us.apache.org/repos/asf/ignite/blob/96f25aef/modules/platforms/dotnet/Apache.Ignite.Core/Binary/UserSerializerProxy.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Binary/UserSerializerProxy.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Binary/UserSerializerProxy.cs
deleted file mode 100644
index 2cfc95e..0000000
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Binary/UserSerializerProxy.cs
+++ /dev/null
@@ -1,68 +0,0 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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 Apache.Ignite.Core.Binary
-{
- using System;
- using System.Diagnostics;
- using System.Runtime.Serialization;
- using Apache.Ignite.Core.Impl.Binary;
-
- /// <summary>
- /// User-defined serializer wrapper.
- /// </summary>
- internal class UserSerializerProxy : IBinarySerializerInternal
- {
- /** */
- private readonly IBinarySerializer _serializer;
-
- /// <summary>
- /// Initializes a new instance of the <see cref="UserSerializerProxy"/> class.
- /// </summary>
- /// <param name="serializer">The serializer.</param>
- public UserSerializerProxy(IBinarySerializer serializer)
- {
- Debug.Assert(serializer != null);
-
- _serializer = serializer;
- }
-
- /** <inheritdoc /> */
- public void WriteBinary<T>(T obj, BinaryWriter writer)
- {
- _serializer.WriteBinary(obj, writer);
- }
-
- /** <inheritdoc /> */
- public T ReadBinary<T>(BinaryReader reader, Type type, int pos)
- {
- var obj = FormatterServices.GetUninitializedObject(type);
-
- reader.AddHandle(pos, obj);
-
- _serializer.ReadBinary(obj, reader);
-
- return (T) obj;
- }
-
- /** <inheritdoc /> */
- public bool SupportsHandles
- {
- get { return true; }
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/96f25aef/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/UserSerializerProxy.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/UserSerializerProxy.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/UserSerializerProxy.cs
new file mode 100644
index 0000000..de25e32
--- /dev/null
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/UserSerializerProxy.cs
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 Apache.Ignite.Core.Impl.Binary
+{
+ using System;
+ using System.Diagnostics;
+ using System.Runtime.Serialization;
+ using Apache.Ignite.Core.Binary;
+
+ /// <summary>
+ /// User-defined serializer wrapper.
+ /// </summary>
+ internal class UserSerializerProxy : IBinarySerializerInternal
+ {
+ /** */
+ private readonly IBinarySerializer _serializer;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="UserSerializerProxy"/> class.
+ /// </summary>
+ /// <param name="serializer">The serializer.</param>
+ public UserSerializerProxy(IBinarySerializer serializer)
+ {
+ Debug.Assert(serializer != null);
+
+ _serializer = serializer;
+ }
+
+ /** <inheritdoc /> */
+ public void WriteBinary<T>(T obj, BinaryWriter writer)
+ {
+ _serializer.WriteBinary(obj, writer);
+ }
+
+ /** <inheritdoc /> */
+ public T ReadBinary<T>(BinaryReader reader, Type type, int pos)
+ {
+ var obj = FormatterServices.GetUninitializedObject(type);
+
+ reader.AddHandle(pos, obj);
+
+ _serializer.ReadBinary(obj, reader);
+
+ return (T) obj;
+ }
+
+ /** <inheritdoc /> */
+ public bool SupportsHandles
+ {
+ get { return true; }
+ }
+ }
+}