Esempio n. 1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public <E extends Exception> void writeTo(org.neo4j.values.AnyValueWriter<E> writer) throws E
        public override void WriteTo <E>(AnyValueWriter <E> writer) where E : Exception
        {
            TextArray l;
            MapValue  p;

            try
            {
                l = Labels();
                p = Properties();
            }
            catch (NotFoundException)
            {
                l = Values.stringArray();
                p = VirtualValues.EMPTY_MAP;
            }
            catch (InvalidRecordException e)
            {
                throw new ReadAndDeleteTransactionConflictException(NodeProxy.isDeletedInCurrentTransaction(_node), e);
            }

            if (Id() < 0)
            {
                writer.WriteVirtualNodeHack(_node);
            }

            writer.WriteNode(_node.Id, l, p);
        }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public <E extends Exception> void writeTo(org.neo4j.values.AnyValueWriter<E> writer) throws E
        public override void WriteTo <E>(AnyValueWriter <E> writer) where E : Exception
        {
            if (_relationship is RelationshipProxy)
            {
                RelationshipProxy proxy = ( RelationshipProxy )_relationship;
                if (!proxy.InitializeData())
                {
                    // If the relationship has been deleted since it was found by the query, then we'll have to tell the client that their transaction conflicted,
                    // and that they need to retry it.
                    throw new ReadAndDeleteTransactionConflictException(RelationshipProxy.isDeletedInCurrentTransaction(_relationship));
                }
            }

            MapValue p;

            try
            {
                p = Properties();
            }
            catch (NotFoundException)
            {
                p = VirtualValues.EMPTY_MAP;
            }
            catch (System.InvalidOperationException e)
            {
                throw new ReadAndDeleteTransactionConflictException(RelationshipProxy.isDeletedInCurrentTransaction(_relationship), e);
            }

            if (Id() < 0)
            {
                writer.WriteVirtualRelationshipHack(_relationship);
            }

            writer.WriteRelationship(Id(), StartNode().id(), EndNode().id(), Type(), p);
        }
Esempio n. 3
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private <E extends Exception> void iterationWriteTo(org.neo4j.values.AnyValueWriter<E> writer) throws E
        private void IterationWriteTo <E>(AnyValueWriter <E> writer) where E : Exception
        {
            writer.BeginList(Size());
            foreach (AnyValue value in this)
            {
                value.WriteTo(writer);
            }
            writer.EndList();
        }
Esempio n. 4
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private <E extends Exception> void randomAccessWriteTo(org.neo4j.values.AnyValueWriter<E> writer) throws E
        private void RandomAccessWriteTo <E>(AnyValueWriter <E> writer) where E : Exception
        {
            writer.BeginList(Size());
            for (int i = 0; i < Size(); i++)
            {
                Value(i).writeTo(writer);
            }
            writer.EndList();
        }
Esempio n. 5
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public <E extends Exception> void writeTo(org.neo4j.values.AnyValueWriter<E> writer) throws E
        public override void WriteTo <E>(AnyValueWriter <E> writer) where E : Exception
        {
            writer.BeginMap(Size());
            Foreach((s, anyValue) =>
            {
                writer.writeString(s);
                anyValue.writeTo(writer);
            });
            writer.EndMap();
        }
Esempio n. 6
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public <E extends Exception> void writeTo(org.neo4j.values.AnyValueWriter<E> writer) throws E
        public override void WriteTo <E>(AnyValueWriter <E> writer) where E : Exception
        {
            switch (IterationPreference())
            {
            case RANDOM_ACCESS:
                RandomAccessWriteTo(writer);
                break;

            case ITERATION:
                IterationWriteTo(writer);
                break;

            default:
                throw new System.InvalidOperationException("not a valid iteration preference");
            }
        }
Esempio n. 7
0
 public override void WriteTo <E>(AnyValueWriter <E> writer) where E : Exception
 {
     throw _e;
 }
Esempio n. 8
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public <E extends Exception> void writeTo(org.neo4j.values.AnyValueWriter<E> writer) throws E
        public override void WriteTo <E>(AnyValueWriter <E> writer) where E : Exception
        {
            writer.WriteRelationshipReference(_id);
        }
Esempio n. 9
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public <E extends Exception> void writeTo(org.neo4j.values.AnyValueWriter<E> writer) throws E
        public override void WriteTo <E>(AnyValueWriter <E> writer) where E : Exception
        {
            writer.WritePath(Nodes(), Relationships());
        }
Esempio n. 10
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public abstract <E extends Exception> void writeTo(AnyValueWriter<E> writer) throws E;
        public abstract void writeTo <E>(AnyValueWriter <E> writer) where E : Exception;
Esempio n. 11
0
 public override void WriteTo(AnyValueWriter writer)
 {
 }
Esempio n. 12
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public <E extends Exception> void writeTo(org.neo4j.values.AnyValueWriter<E> writer) throws E
        public override void WriteTo <E>(AnyValueWriter <E> writer) where E : Exception
        {
            writer.WriteNode(_id, Labels(), Properties());
        }
Esempio n. 13
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public <E extends Exception> void writeTo(org.neo4j.values.AnyValueWriter<E> writer) throws E
        public override void WriteTo <E>(AnyValueWriter <E> writer) where E : Exception
        {
            WriteTo((ValueWriter <E>)writer);
        }
Esempio n. 14
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public <E extends Exception> void writeTo(org.neo4j.values.AnyValueWriter<E> writer) throws E
		 public override void WriteTo<E>( AnyValueWriter<E> writer ) where E : Exception
		 {
			  writer.WriteRelationship( _id, StartNode().id(), EndNode().id(), Type(), Properties() );
		 }