• Tutorials
  • Api Documentation
  • Download
  • Credits
Show / Hide Table of Contents
  • AutoCheck.Core
    • Output
    • Output.Log
    • Output.Style
    • Output.Type
    • Script
    • Script.ExecutionMode
    • Utils
    • Utils.OS
  • AutoCheck.Core.Connectors
    • Atom
    • Base
    • Compressed
    • Css
    • Csv
    • CsvDocument
    • Dmoj
    • GDrive
    • Html
    • Math
    • Odoo
    • Operator
    • PlainText
    • PlainText.PlainTextDocument
    • Postgres
    • Rss
    • Shell
    • TextStream
    • Xml
    • Xml.XmlNodeType
  • AutoCheck.Core.CopyDetectors
    • Base
    • Base.Mode
    • Css
    • Html
    • PlainText
    • PlainText.File
    • SourceCode
    • SqlLog
    • Xml
  • AutoCheck.Core.Events
    • LogUpdateEventArgs
    • StatusUpdateEventArgs
    • StatusUpdateEventArgs.ExecutionEvent
  • AutoCheck.Core.Exceptions
    • ArgumentInvalidException
    • ArgumentNotFoundException
    • ConfigFileMissingException
    • ConnectionInvalidException
    • ConnectorInvalidException
    • ConnectorNotFoundException
    • DocumentInvalidException
    • DownloadFailedException
    • ItemNotFoundException
    • PorpertyNotFoundException
    • QueryInvalidException
    • RegexInvalidException
    • ResultMismatchException
    • ScriptInvalidException
    • ScriptNotFoundException
    • StyleInvalidException
    • StyleNotAppliedException
    • StyleNotFoundException
    • TableInconsistencyException
    • VariableInvalidException
    • VariableNotFoundException
  • Google.DiffMatchPatch
    • Diff
    • DiffMatchPatch
    • Operation
    • Patch

Class Base

This class must be inherited in order to develop a custom copy detectors. This class is in charge of performing the copy detection along the student's files, code the abstract methods and provide all the necessary extra code needed.

Inheritance
System.Object
Base
PlainText
Namespace: AutoCheck.Core.CopyDetectors
Assembly: AutoCheck.Core.dll
Syntax
public abstract class Base : IDisposable

Constructors

| Improve this Doc View Source

Base(Single, Int32, String)

Creates a new instance, setting up its properties in order to allow copy detection with the lowest possible false-positive probability.

Declaration
public Base(float threshold, int sensibility, string filePattern = "*")
Parameters
Type Name Description
System.Single threshold
System.Int32 sensibility
System.String filePattern
| Improve this Doc View Source

Base(Single, String)

Creates a new instance, setting up its properties in order to allow copy detection with the lowest possible false-positive probability.

Declaration
public Base(float threshold, string filePattern = "*")
Parameters
Type Name Description
System.Single threshold
System.String filePattern

Properties

| Improve this Doc View Source

Count

The amount of items loaded into the copy detector.

Declaration
public abstract int Count { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

FilePattern

Pattern that will be used to find and load files within the copy detector.

Declaration
public string FilePattern { get; protected set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Sensibility

The comparison sensibility, a lower value increases the sensibility so produces more potential copy results.

Declaration
protected int Sensibility { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Threshold

Match values higher than this one, will be considered as a potential copy.

Declaration
public float Threshold { get; protected set; }
Property Value
Type Description
System.Single

Methods

| Improve this Doc View Source

Compare()

Performs the item comparison between each other.

Declaration
public abstract void Compare()
| Improve this Doc View Source

CopyDetected(String)

Checks if a potential copy has been detected. The Compare() method should be called firts.

Declaration
public abstract bool CopyDetected(string path)
Parameters
Type Name Description
System.String path

The path to a compared file.

Returns
Type Description
System.Boolean

True of copy has been detected.

| Improve this Doc View Source

Dispose()

Disposes the current copy detector instance and releases its internal objects.

Declaration
public abstract void Dispose()
| Improve this Doc View Source

GetDetails(String)

Returns a printable details list, containing information about the comparissons (student, source and % of match).

Declaration
public abstract (string Folder, string File, (string Folder, string File, float Match)[] matches) GetDetails(string path)
Parameters
Type Name Description
System.String path

Student name

Returns
Type Description
System.ValueTuple<System.String, System.String, System.ValueTuple<System.String, System.String, System.Single>[]>

Left file followed by all the right files compared with its matching score.

| Improve this Doc View Source

Load(Utils.OS, String, String, String, Int32, String)

Loads a remote file into the local collection in order to compare it when Compare() is called.

Declaration
public virtual void Load(Utils.OS os, string host, string username, string password, int port, string path)
Parameters
Type Name Description
Utils.OS os
System.String host

Remote OS family.

System.String username

The username wich will be used to connect with the remote host.

System.String password

The password wich will be used to connect with the remote host.

System.Int32 port
System.String path

Path to a file or folder; if the path points to a folder, the first file found using the FilePattern property will be loaded.

| Improve this Doc View Source

Load(Utils.OS, String, String, String, String)

Loads a remote file into the local collection in order to compare it when Compare() is called.

Declaration
public virtual void Load(Utils.OS os, string host, string username, string password, string path)
Parameters
Type Name Description
Utils.OS os
System.String host

Remote OS family.

System.String username

The username wich will be used to connect with the remote host.

System.String password

The password wich will be used to connect with the remote host.

System.String path
| Improve this Doc View Source

Load(String)

Loads a local file into the local collection in order to compare it when Compare() is called.

Declaration
public virtual void Load(string path)
Parameters
Type Name Description
System.String path

Path to a file or folder; if the path points to a folder, the first file found using the FilePattern property will be loaded.

| Improve this Doc View Source

Load(String, String)

Loads the given file into the local collection, in order to compare it when Compare() is called.

Declaration
public abstract void Load(string folder, string file)
Parameters
Type Name Description
System.String folder

Path where the files will be looked for.

System.String file

File that will be loaded into the copy detector.

Extension Methods

ObjectExtensions.DeepClone<T>(T)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX