content stringlengths 5 1.04M | avg_line_length float64 1.75 12.9k | max_line_length int64 2 244k | alphanum_fraction float64 0 0.98 | licenses list | repository_name stringlengths 7 92 | path stringlengths 3 249 | size int64 5 1.04M | lang stringclasses 2 values |
|---|---|---|---|---|---|---|---|---|
// ----------------------------------------------------------------------------
// <auto-generated>
// This is autogenerated code by CppSharp.
// Do not edit this file or all your changes will be lost after re-generation.
// </auto-generated>
// ----------------------------------------------------------------------------
using System;
using System.Runtime.InteropServices;
using System.Security;
using System.Runtime.CompilerServices;
[assembly:InternalsVisibleTo("CppSharp.Parser.CSharp")]
[assembly:InternalsVisibleTo("CppSharp.CppParser")]
namespace Std
{
namespace Allocator
{
[StructLayout(LayoutKind.Explicit, Size = 0)]
public unsafe partial struct __Internal
{
[SuppressUnmanagedCodeSecurity]
[DllImport("Std-symbols", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZNSaIcEC2Ev")]
internal static extern void ctorc__N_std_S_allocator__C(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("Std-symbols", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZNSaIcED2Ev")]
internal static extern void dtorc__N_std_S_allocator__C(global::System.IntPtr instance);
}
}
public unsafe partial class Allocator<_Tp> : IDisposable
{
public global::System.IntPtr __Instance { get; protected set; }
protected int __PointerAdjustment;
internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::Std.Allocator<_Tp>> NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::Std.Allocator<_Tp>>();
protected void*[] __OriginalVTables;
protected bool __ownsNativeInstance;
internal static global::Std.Allocator<_Tp> __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::Std.Allocator<_Tp>(native.ToPointer(), skipVTables);
}
internal static global::Std.Allocator<_Tp> __CreateInstance(global::Std.Allocator.__Internal native, bool skipVTables = false)
{
return new global::Std.Allocator<_Tp>(native, skipVTables);
}
private static void* __CopyValue(global::Std.Allocator.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::Std.Allocator.__Internal));
*(global::Std.Allocator.__Internal*) ret = native;
return ret.ToPointer();
}
private Allocator(global::Std.Allocator.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected Allocator(void* native, bool skipVTables = false)
{
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public Allocator()
{
var ___Tp = typeof(_Tp);
if (___Tp.IsAssignableFrom(typeof(sbyte)))
{
__Instance = Marshal.AllocHGlobal(sizeof(global::Std.Allocator.__Internal));
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
global::Std.Allocator.__Internal.ctorc__N_std_S_allocator__C((__Instance + __PointerAdjustment));
return;
}
throw new ArgumentOutOfRangeException("_Tp", string.Join(", ", new[] { typeof(_Tp).FullName }), "global::Std.Allocator<_Tp> maps a C++ template class and therefore it only supports a limited set of types and their subclasses: <sbyte>.");
}
public void Dispose()
{
Dispose(disposing: true);
}
public virtual void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::Std.Allocator<_Tp> __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
{
var ___Tp = typeof(_Tp);
if (___Tp.IsAssignableFrom(typeof(sbyte)))
{
global::Std.Allocator.__Internal.dtorc__N_std_S_allocator__C((__Instance + __PointerAdjustment));
return;
}
throw new ArgumentOutOfRangeException("_Tp", string.Join(", ", new[] { typeof(_Tp).FullName }), "global::Std.Allocator<_Tp> maps a C++ template class and therefore it only supports a limited set of types and their subclasses: <sbyte>.");
}
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
}
}
namespace Std
{
namespace Vector
{
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_PreprocessedEntity___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_BlockContentComment___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Namespace___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Enumeration___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Function___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Class___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Template___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_TypedefDecl___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_TypeAlias___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Variable___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Friend___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_BaseClassSpecifier___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Field___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Method___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Parameter___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_FunctionTemplateSpecialization___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S_vector____N_CppSharp_N_CppParser_N_AST_S_TemplateArgument___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_AccessSpecifierDecl___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S_vector____N_CppSharp_N_CppParser_N_AST_S_VFTableInfo___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S_vector____N_CppSharp_N_CppParser_N_AST_S_VTableComponent___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S_vector____N_CppSharp_N_CppParser_N_AST_S_LayoutField___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S_vector____N_CppSharp_N_CppParser_N_AST_S_LayoutBase___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Enumeration_S_Item___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S_vector____N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_ClassTemplateSpecialization___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_Expression___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_VarTemplateSpecialization___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_MacroDefinition___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_TranslationUnit___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_InlineContentComment___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S_vector____N_CppSharp_N_CppParser_N_AST_S_BlockCommandComment_S_Argument___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S_vector__i___N_std_S_allocator__i
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S_vector_____N_CppSharp_N_CppParser_N_AST_S_VerbatimBlockLineComment___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S_vector____N_CppSharp_N_CppParser_N_AST_S_InlineCommandComment_S_Argument___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S_vector____N_CppSharp_N_CppParser_N_AST_S_HTMLStartTagComment_S_Attribute___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S_vector____N_CppSharp_N_CppParser_S_ParserDiagnostic___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
}
namespace VectorBase
{
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S__Vector_base_____N_CppSharp_N_CppParser_N_AST_S_PreprocessedEntity___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S__Vector_base_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S__Vector_base_____N_CppSharp_N_CppParser_N_AST_S_BlockContentComment___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S__Vector_base_____N_CppSharp_N_CppParser_N_AST_S_Template___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S__Vector_base_____N_CppSharp_N_CppParser_N_AST_S_TypedefDecl___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S__Vector_base_____N_CppSharp_N_CppParser_N_AST_S_TypeAlias___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S__Vector_base_____N_CppSharp_N_CppParser_N_AST_S_Variable___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S__Vector_base_____N_CppSharp_N_CppParser_N_AST_S_Friend___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S__Vector_base_____N_CppSharp_N_CppParser_N_AST_S_BaseClassSpecifier___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S__Vector_base_____N_CppSharp_N_CppParser_N_AST_S_Field___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S__Vector_base_____N_CppSharp_N_CppParser_N_AST_S_Parameter___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S__Vector_base_____N_CppSharp_N_CppParser_N_AST_S_FunctionTemplateSpecialization___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S__Vector_base____N_CppSharp_N_CppParser_N_AST_S_TemplateArgument___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S__Vector_base_____N_CppSharp_N_CppParser_N_AST_S_Method___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S__Vector_base_____N_CppSharp_N_CppParser_N_AST_S_AccessSpecifierDecl___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S__Vector_base____N_CppSharp_N_CppParser_N_AST_S_VTableComponent___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S__Vector_base____N_CppSharp_N_CppParser_N_AST_S_VFTableInfo___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S__Vector_base____N_CppSharp_N_CppParser_N_AST_S_LayoutField___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S__Vector_base____N_CppSharp_N_CppParser_N_AST_S_LayoutBase___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S__Vector_base_____N_CppSharp_N_CppParser_N_AST_S_Class___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S__Vector_base_____N_CppSharp_N_CppParser_N_AST_S_Function___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S__Vector_base_____N_CppSharp_N_CppParser_N_AST_S_Enumeration_S_Item___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S__Vector_base_____N_CppSharp_N_CppParser_N_AST_S_Enumeration___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S__Vector_base_____N_CppSharp_N_CppParser_N_AST_S_Namespace___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S__Vector_base____N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S__Vector_base_____N_CppSharp_N_CppParser_N_AST_S_ClassTemplateSpecialization___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S__Vector_base_____N_CppSharp_N_CppParser_N_AST_S_Expression___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S__Vector_base_____N_CppSharp_N_CppParser_N_AST_S_VarTemplateSpecialization___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S__Vector_base_____N_CppSharp_N_CppParser_N_AST_S_MacroDefinition___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S__Vector_base_____N_CppSharp_N_CppParser_N_AST_S_TranslationUnit___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S__Vector_base_____N_CppSharp_N_CppParser_N_AST_S_InlineContentComment___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S__Vector_base____N_CppSharp_N_CppParser_N_AST_S_BlockCommandComment_S_Argument___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S__Vector_base__i___N_std_S_allocator__i
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S__Vector_base_____N_CppSharp_N_CppParser_N_AST_S_VerbatimBlockLineComment___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S__Vector_base____N_CppSharp_N_CppParser_N_AST_S_InlineCommandComment_S_Argument___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S__Vector_base____N_CppSharp_N_CppParser_N_AST_S_HTMLStartTagComment_S_Attribute___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internalc__N_std_S__Vector_base____N_CppSharp_N_CppParser_S_ParserDiagnostic___N_std_S_allocator__S0_
{
[FieldOffset(0)]
internal global::Std.VectorBase.VectorImpl.__Internal _M_impl;
}
namespace VectorImpl
{
[StructLayout(LayoutKind.Explicit, Size = 24)]
public unsafe partial struct __Internal
{
[FieldOffset(0)]
internal global::System.IntPtr _M_start;
[FieldOffset(8)]
internal global::System.IntPtr _M_finish;
[FieldOffset(16)]
internal global::System.IntPtr _M_end_of_storage;
}
}
}
}
namespace Std
{
namespace Less
{
[StructLayout(LayoutKind.Explicit, Size = 0)]
public unsafe partial struct __Internal
{
}
}
}
namespace Std
{
public enum RbTreeColor : uint
{
S_red = 0,
S_black = 1
}
namespace RbTree
{
namespace RbTreeImpl
{
[StructLayout(LayoutKind.Explicit, Size = 48)]
public unsafe partial struct __Internal
{
[FieldOffset(0)]
internal global::Std.Less.__Internal _M_key_compare;
[FieldOffset(8)]
internal global::Std.RbTreeNodeBase.__Internal _M_header;
[FieldOffset(40)]
internal ulong _M_node_count;
}
}
[StructLayout(LayoutKind.Explicit, Size = 48)]
public unsafe partial struct __Internalc__N_std_S__Rb_tree____N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C___N_std_S_pair__1S0_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S__Select1st__S3____N_std_S_less__S0____N_std_S_allocator__S3_
{
[FieldOffset(0)]
internal global::Std.RbTree.RbTreeImpl.__Internal _M_impl;
}
}
public unsafe partial class RbTreeNodeBase
{
[StructLayout(LayoutKind.Explicit, Size = 32)]
public partial struct __Internal
{
[FieldOffset(0)]
internal global::Std.RbTreeColor _M_color;
[FieldOffset(8)]
internal global::System.IntPtr _M_parent;
[FieldOffset(16)]
internal global::System.IntPtr _M_left;
[FieldOffset(24)]
internal global::System.IntPtr _M_right;
}
}
}
namespace GnuCxx
{
}
namespace Std
{
namespace Map
{
[StructLayout(LayoutKind.Explicit, Size = 48)]
public unsafe partial struct __Internalc__N_std_S_map____N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S_less__S0____N_std_S_allocator____N_std_S_pair__1S0__S3_
{
[FieldOffset(0)]
internal global::Std.RbTree.__Internalc__N_std_S__Rb_tree____N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C___N_std_S_pair__1S0_____N_CppSharp_N_CppParser_N_AST_S_Declaration___N_std_S__Select1st__S3____N_std_S_less__S0____N_std_S_allocator__S3_ _M_t;
}
}
}
namespace Std
{
}
namespace Std
{
namespace CharTraits
{
[StructLayout(LayoutKind.Explicit, Size = 0)]
public unsafe partial struct __Internal
{
}
}
public unsafe partial class CharTraits<_CharT> : IDisposable
{
public global::System.IntPtr __Instance { get; protected set; }
protected int __PointerAdjustment;
internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::Std.CharTraits<_CharT>> NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::Std.CharTraits<_CharT>>();
protected void*[] __OriginalVTables;
protected bool __ownsNativeInstance;
internal static global::Std.CharTraits<_CharT> __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::Std.CharTraits<_CharT>(native.ToPointer(), skipVTables);
}
internal static global::Std.CharTraits<_CharT> __CreateInstance(global::Std.CharTraits.__Internal native, bool skipVTables = false)
{
return new global::Std.CharTraits<_CharT>(native, skipVTables);
}
private static void* __CopyValue(global::Std.CharTraits.__Internal native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::Std.CharTraits.__Internal));
*(global::Std.CharTraits.__Internal*) ret = native;
return ret.ToPointer();
}
private CharTraits(global::Std.CharTraits.__Internal native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected CharTraits(void* native, bool skipVTables = false)
{
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public void Dispose()
{
Dispose(disposing: true);
}
public virtual void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::Std.CharTraits<_CharT> __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
}
}
namespace Std
{
public unsafe static partial class BasicStringExtensions
{
[StructLayout(LayoutKind.Explicit, Size = 0)]
public partial struct __Internal
{
[SuppressUnmanagedCodeSecurity]
[DllImport("Std-symbols", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZNSsC2EPKcRKSaIcE")]
internal static extern global::System.IntPtr BasicString(global::System.IntPtr instance, [MarshalAs(UnmanagedType.LPStr)] string __s, global::System.IntPtr __a);
[SuppressUnmanagedCodeSecurity]
[DllImport("Std-symbols", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZNKSs5c_strEv")]
internal static extern global::System.IntPtr CStr(global::System.IntPtr instance);
}
public static global::Std.BasicString<sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>> BasicString(string __s, global::Std.Allocator<sbyte> __a)
{
if (ReferenceEquals(__a, null))
throw new global::System.ArgumentNullException("__a", "Cannot be null because it is a C++ reference (&).");
var __arg1 = __a.__Instance;
if (ReferenceEquals(__s, null))
throw new global::System.ArgumentNullException(__s, "The underlying std::string cannot take null.");
var __ret = Marshal.AllocHGlobal(8);
__Internal.BasicString(__ret, __s, __arg1);
global::Std.BasicString<sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>> __result0;
if (__ret == IntPtr.Zero) __result0 = null;
else if (global::Std.BasicString<sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>>.NativeToManagedMap.ContainsKey(__ret))
__result0 = (global::Std.BasicString<sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>>) global::Std.BasicString<sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>>.NativeToManagedMap[__ret];
else __result0 = global::Std.BasicString<sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>>.__CreateInstance(__ret);
return __result0;
}
public static string CStr(this global::Std.BasicString<sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>> @this)
{
var __arg0 = ReferenceEquals(@this, null) ? global::System.IntPtr.Zero : @this.__Instance;
var __ret = __Internal.CStr(__arg0);
return Marshal.PtrToStringAnsi(__ret);
}
}
namespace BasicString
{
[StructLayout(LayoutKind.Explicit, Size = 8)]
public unsafe partial struct __Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C
{
[FieldOffset(0)]
internal global::Std.BasicString.AllocHider.__Internal _M_dataplus;
[SuppressUnmanagedCodeSecurity]
[DllImport("Std-symbols", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZNSsD2Ev")]
internal static extern void dtorc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C(global::System.IntPtr instance);
[SuppressUnmanagedCodeSecurity]
[DllImport("Std-symbols", CallingConvention = global::System.Runtime.InteropServices.CallingConvention.Cdecl,
EntryPoint="_ZNKSs5c_strEv")]
internal static extern global::System.IntPtr CStrc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C(global::System.IntPtr instance);
}
namespace AllocHider
{
[StructLayout(LayoutKind.Explicit, Size = 8)]
public unsafe partial struct __Internal
{
[FieldOffset(0)]
internal global::System.IntPtr _M_p;
}
}
}
public unsafe partial class BasicString<_CharT, _Traits, _Alloc> : IDisposable
{
public global::System.IntPtr __Instance { get; protected set; }
protected int __PointerAdjustment;
internal static readonly global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::Std.BasicString<_CharT, _Traits, _Alloc>> NativeToManagedMap = new global::System.Collections.Concurrent.ConcurrentDictionary<IntPtr, global::Std.BasicString<_CharT, _Traits, _Alloc>>();
protected void*[] __OriginalVTables;
protected bool __ownsNativeInstance;
internal static global::Std.BasicString<_CharT, _Traits, _Alloc> __CreateInstance(global::System.IntPtr native, bool skipVTables = false)
{
return new global::Std.BasicString<_CharT, _Traits, _Alloc>(native.ToPointer(), skipVTables);
}
internal static global::Std.BasicString<_CharT, _Traits, _Alloc> __CreateInstance(global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C native, bool skipVTables = false)
{
return new global::Std.BasicString<_CharT, _Traits, _Alloc>(native, skipVTables);
}
private static void* __CopyValue(global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C native)
{
var ret = Marshal.AllocHGlobal(sizeof(global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C));
*(global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C*) ret = native;
return ret.ToPointer();
}
private BasicString(global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C native, bool skipVTables = false)
: this(__CopyValue(native), skipVTables)
{
__ownsNativeInstance = true;
NativeToManagedMap[__Instance] = this;
}
protected BasicString(void* native, bool skipVTables = false)
{
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
public void Dispose()
{
Dispose(disposing: true);
}
public virtual void Dispose(bool disposing)
{
if (__Instance == IntPtr.Zero)
return;
global::Std.BasicString<_CharT, _Traits, _Alloc> __dummy;
NativeToManagedMap.TryRemove(__Instance, out __dummy);
if (disposing)
{
var ___CharT = typeof(_CharT);
var ___Traits = typeof(_Traits);
var ___Alloc = typeof(_Alloc);
if (___CharT.IsAssignableFrom(typeof(sbyte)) && ___Traits.IsAssignableFrom(typeof(global::Std.CharTraits<sbyte>)) && ___Alloc.IsAssignableFrom(typeof(global::Std.Allocator<sbyte>)))
{
global::Std.BasicString.__Internalc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C.dtorc__N_std_S_basic_string__C___N_std_S_char_traits__C___N_std_S_allocator__C((__Instance + __PointerAdjustment));
return;
}
throw new ArgumentOutOfRangeException("_CharT, _Traits, _Alloc", string.Join(", ", new[] { typeof(_CharT).FullName, typeof(_Traits).FullName, typeof(_Alloc).FullName }), "global::Std.BasicString<_CharT, _Traits, _Alloc> maps a C++ template class and therefore it only supports a limited set of types and their subclasses: <sbyte, global::Std.CharTraits<sbyte>, global::Std.Allocator<sbyte>>.");
}
if (__ownsNativeInstance)
Marshal.FreeHGlobal(__Instance);
__Instance = IntPtr.Zero;
}
}
}
namespace Std
{
}
| 43.760622 | 410 | 0.687537 | [
"MIT"
] | VPeruS/CppSharp | src/CppParser/Bindings/CSharp/x86_64-linux-gnu/Std.cs | 42,229 | C# |
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Splitio.Domain;
using Splitio.Services.Cache.Classes;
using System.Collections.Concurrent;
using System.Collections.Generic;
namespace Splitio_Tests.Unit_Tests.Cache
{
[TestClass]
public class SegmentCacheTests
{
[TestMethod]
public void RegisterSegmentTest()
{
//Arrange
var segmentCache = new InMemorySegmentCache(new ConcurrentDictionary<string, Segment>());
var keys = new List<string> { "abcd", "1234" };
var segmentName = "test";
//Act
segmentCache.AddToSegment(segmentName, keys);
var result = segmentCache.IsInSegment(segmentName, "abcd");
//Assert
Assert.IsTrue(result);
}
[TestMethod]
public void IsNotInSegmentTest()
{
//Arrange
var segmentCache = new InMemorySegmentCache(new ConcurrentDictionary<string, Segment>());
var keys = new List<string> { "1234" };
var segmentName = "test";
//Act
segmentCache.AddToSegment(segmentName, keys);
var result = segmentCache.IsInSegment(segmentName, "abcd");
//Assert
Assert.IsFalse(result);
}
[TestMethod]
public void IsInSegmentWithInexistentSegmentTest()
{
//Arrange
var segmentCache = new InMemorySegmentCache(new ConcurrentDictionary<string, Segment>());
//Act
var result = segmentCache.IsInSegment("test", "abcd");
//Assert
Assert.IsFalse(result);
}
[TestMethod]
public void RemoveKeyFromSegmentTest()
{
//Arrange
var segmentCache = new InMemorySegmentCache(new ConcurrentDictionary<string, Segment>());
var keys = new List<string> { "1234" };
var segmentName = "test";
//Act
segmentCache.AddToSegment(segmentName, keys);
var result = segmentCache.IsInSegment(segmentName, "1234");
segmentCache.RemoveFromSegment(segmentName, keys);
var result2 = segmentCache.IsInSegment(segmentName, "1234");
//Assert
Assert.IsTrue(result);
Assert.IsFalse(result2);
}
[TestMethod]
public void SetAndGetChangeNumberTest()
{
//Arrange
var segmentCache = new InMemorySegmentCache(new ConcurrentDictionary<string, Segment>());
var segmentName = "test";
//Act
segmentCache.AddToSegment(segmentName, null);
segmentCache.SetChangeNumber(segmentName, 1234);
var result = segmentCache.GetChangeNumber(segmentName);
//Assert
Assert.AreEqual(1234, result);
}
[TestMethod]
public void GetSegmentKeysTest()
{
// Arrange.
var segmentCache = new InMemorySegmentCache(new ConcurrentDictionary<string, Segment>());
var keys = new List<string> { "abcd", "1234" };
var segmentName = "test";
segmentCache.AddToSegment(segmentName, keys);
// Act & Assert.
var result = segmentCache.GetSegmentKeys(segmentName);
Assert.AreEqual(2, result.Count);
Assert.IsTrue(result.Contains("abcd"));
Assert.IsTrue(result.Contains("1234"));
var otherSegment = "segmentName";
var otherKeys = new List<string>();
result = segmentCache.GetSegmentKeys(otherSegment);
Assert.AreEqual(0, result.Count);
segmentCache.AddToSegment(otherSegment, otherKeys);
result = segmentCache.GetSegmentKeys(otherSegment);
Assert.AreEqual(0, result.Count);
}
[TestMethod]
public void GetSegmentNamesTest()
{
// Arrange.
var segmentCache = new InMemorySegmentCache(new ConcurrentDictionary<string, Segment>());
// Act & Assert.
var result = segmentCache.GetSegmentNames();
Assert.AreEqual(0, result.Count);
var keys = new List<string> { "abcd", "1234" };
var segmentName = "test";
segmentCache.AddToSegment(segmentName, keys);
segmentCache.AddToSegment($"{segmentName}-1", keys);
segmentCache.AddToSegment($"{segmentName}-2", keys);
result = segmentCache.GetSegmentNames();
Assert.AreEqual(3, result.Count);
Assert.IsTrue(result.Contains(segmentName));
Assert.IsTrue(result.Contains($"{segmentName}-1"));
Assert.IsTrue(result.Contains($"{segmentName}-2"));
}
}
}
| 34.049645 | 101 | 0.582379 | [
"Apache-2.0"
] | splitio/dotnet-client | Splitio-tests/Unit Tests/Cache/SegmentCacheTests.cs | 4,803 | C# |
using Orleans.Runtime;
using System;
using System.Collections.Generic;
using System.Linq;
using NRClient = NewRelic.Api.Agent.NewRelic;
namespace Orleans.TelemetryConsumers.NewRelic
{
public class NRTelemetryConsumer : IEventTelemetryConsumer, IExceptionTelemetryConsumer,
IDependencyTelemetryConsumer, IMetricTelemetryConsumer, IRequestTelemetryConsumer
{
public NRTelemetryConsumer()
{
NRClient.StartAgent();
}
public void DecrementMetric(string name)
{
NRClient.RecordMetric(name, -1);
}
public void DecrementMetric(string name, double value)
{
NRClient.RecordMetric(name, (float)value * -1);
}
public void IncrementMetric(string name)
{
NRClient.RecordMetric(name, 1);
NRClient.IncrementCounter(name);
}
public void IncrementMetric(string name, double value)
{
NRClient.RecordMetric(name, (float)value);
}
public void TrackDependency(string dependencyName, string commandName, DateTimeOffset startTime, TimeSpan duration, bool success)
{
NRClient.RecordResponseTimeMetric(string.Format("{0}\\{1}", dependencyName, commandName), (long)duration.TotalMilliseconds);
}
public void TrackEvent(string eventName, IDictionary<string, string> properties = null, IDictionary<string, double> metrics = null)
{
NRClient.RecordCustomEvent(eventName, metrics != null ? metrics.ToDictionary(e=>e.Key, e=> (object)e.Value) : null);
AddMetric(metrics);
AddProperties(properties);
}
public void TrackException(Exception exception, IDictionary<string, string> properties = null, IDictionary<string, double> metrics = null)
{
AddMetric(metrics);
NRClient.NoticeError(exception, properties);
}
public void TrackMetric(string name, TimeSpan value, IDictionary<string, string> properties = null)
{
AddProperties(properties);
NRClient.RecordMetric(name, (float)value.TotalMilliseconds);
}
public void TrackMetric(string name, double value, IDictionary<string, string> properties = null)
{
AddProperties(properties);
NRClient.RecordMetric(name, (float)value);
}
public void TrackRequest(string name, DateTimeOffset startTime, TimeSpan duration, string responseCode, bool success)
{
NRClient.RecordMetric(name, (float)duration.TotalMilliseconds);
}
private static void AddMetric(IDictionary<string, double> metrics)
{
if (metrics != null)
{
metrics.AsParallel().ForAll(m =>
{
NRClient.AddCustomParameter(m.Key, m.Value);
});
}
}
private static void AddProperties(IDictionary<string, string> properties)
{
if (properties != null)
{
properties.AsParallel().ForAll(p =>
{
NRClient.AddCustomParameter(p.Key, p.Value);
});
}
}
}
}
| 34.302083 | 146 | 0.603705 | [
"MIT"
] | ghuntley/orleans | src/OrleansTelemetryConsumers.NewRelic/NRTelemetryConsumer.cs | 3,295 | C# |
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("GeneratingVectors")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("GeneratingVectors")]
[assembly: System.Reflection.AssemblyTitleAttribute("GeneratingVectors")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// Generated by the MSBuild WriteCodeFragment class.
| 41.826087 | 80 | 0.653846 | [
"MIT"
] | wuweisage/SoftuniSvetlina-Courses | C#/DataStructuresAndAlgorithms/Recursive-Algorithms-And-Backtracking/GeneratingVectors/obj/Debug/netcoreapp3.1/GeneratingVectors.AssemblyInfo.cs | 962 | C# |
/*
* Copyright 2012-2013 DigitasLBi Netherlands B.V.
*
* Licensed 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.
*/
using System.Collections;
using System.Linq;
using System.Xml.XPath;
using System.Xml.Xsl;
namespace LBi.LostDoc.Templating.XPath
{
public class XsltContextAssetVersionGetter : IXsltContextFunction
{
private VersionComponent? _ignoredVersionComponent;
public XsltContextAssetVersionGetter(VersionComponent? ignoredVersionComponent = null)
{
this._ignoredVersionComponent = ignoredVersionComponent;
}
#region IXsltContextFunction Members
public object Invoke(XsltContext xsltContext, object[] args, XPathNavigator docContext)
{
AssetIdentifier aid = AssetIdentifier.Parse(Template.ResultToString(args[0]));
if (this._ignoredVersionComponent.HasValue)
return aid.Version.ToString((int)this._ignoredVersionComponent.Value);
return aid.Version.ToString();
}
public int Minargs
{
get { return 1; }
}
public int Maxargs
{
get { return 1; }
}
public XPathResultType ReturnType
{
get { return XPathResultType.String; }
}
public XPathResultType[] ArgTypes
{
get { return new[] {XPathResultType.String}; }
}
#endregion
}
}
| 28.441176 | 95 | 0.66029 | [
"Apache-2.0"
] | redoz/LBi.LostDoc | LBi.LostDoc/Templating/XPath/XsltContextAssetVersionGetter.cs | 1,934 | C# |
//------------------------------------------------------------------------------
// <copyright file="_Events.cs" company="Microsoft">
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
// <owner current="true" primary="true">[....]</owner>
//------------------------------------------------------------------------------
namespace System.Xml.Serialization {
using System.IO;
using System;
using System.Collections;
using System.ComponentModel;
/// <include file='doc\_Events.uex' path='docs/doc[@for="XmlAttributeEventHandler"]/*' />
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
public delegate void XmlAttributeEventHandler(object sender, XmlAttributeEventArgs e);
/// <include file='doc\_Events.uex' path='docs/doc[@for="XmlAttributeEventArgs"]/*' />
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
public class XmlAttributeEventArgs : EventArgs {
object o;
XmlAttribute attr;
string qnames;
int lineNumber;
int linePosition;
internal XmlAttributeEventArgs(XmlAttribute attr, int lineNumber, int linePosition, object o, string qnames) {
this.attr = attr;
this.o = o;
this.qnames = qnames;
this.lineNumber = lineNumber;
this.linePosition = linePosition;
}
/// <include file='doc\_Events.uex' path='docs/doc[@for="XmlAttributeEventArgs.ObjectBeingDeserialized"]/*' />
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
public object ObjectBeingDeserialized {
get { return o; }
}
/// <include file='doc\_Events.uex' path='docs/doc[@for="XmlAttributeEventArgs.Attr"]/*' />
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
public XmlAttribute Attr {
get { return attr; }
}
/// <include file='doc\_Events.uex' path='docs/doc[@for="XmlAttributeEventArgs.LineNumber"]/*' />
/// <devdoc>
/// <para>
/// Gets the current line number.
/// </para>
/// </devdoc>
public int LineNumber {
get { return lineNumber; }
}
/// <include file='doc\_Events.uex' path='docs/doc[@for="XmlAttributeEventArgs.LinePosition"]/*' />
/// <devdoc>
/// <para>
/// Gets the current line position.
/// </para>
/// </devdoc>
public int LinePosition {
get { return linePosition; }
}
/// <include file='doc\_Events.uex' path='docs/doc[@for="XmlAttributeEventArgs.Attributes"]/*' />
/// <devdoc>
/// <para>
/// List the qnames of attributes expected in the current context.
/// </para>
/// </devdoc>
public string ExpectedAttributes {
get { return qnames == null ? string.Empty : qnames; }
}
}
/// <include file='doc\_Events.uex' path='docs/doc[@for="XmlElementEventHandler"]/*' />
public delegate void XmlElementEventHandler(object sender, XmlElementEventArgs e);
/// <include file='doc\_Events.uex' path='docs/doc[@for="XmlElementEventArgs"]/*' />
public class XmlElementEventArgs : EventArgs {
object o;
XmlElement elem;
string qnames;
int lineNumber;
int linePosition;
internal XmlElementEventArgs(XmlElement elem, int lineNumber, int linePosition, object o, string qnames) {
this.elem = elem;
this.o = o;
this.qnames = qnames;
this.lineNumber = lineNumber;
this.linePosition = linePosition;
}
/// <include file='doc\_Events.uex' path='docs/doc[@for="XmlElementEventArgs.ObjectBeingDeserialized"]/*' />
public object ObjectBeingDeserialized {
get { return o; }
}
/// <include file='doc\_Events.uex' path='docs/doc[@for="XmlElementEventArgs.Attr"]/*' />
public XmlElement Element {
get { return elem; }
}
/// <include file='doc\_Events.uex' path='docs/doc[@for="XmlElementEventArgs.LineNumber"]/*' />
public int LineNumber {
get { return lineNumber; }
}
/// <include file='doc\_Events.uex' path='docs/doc[@for="XmlElementEventArgs.LinePosition"]/*' />
public int LinePosition {
get { return linePosition; }
}
/// <include file='doc\_Events.uex' path='docs/doc[@for="XmlAttributeEventArgs.ExpectedElements"]/*' />
/// <devdoc>
/// <para>
/// List of qnames of elements expected in the current context.
/// </para>
/// </devdoc>
public string ExpectedElements {
get { return qnames == null ? string.Empty : qnames; }
}
}
/// <include file='doc\_Events.uex' path='docs/doc[@for="XmlNodeEventHandler"]/*' />
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
public delegate void XmlNodeEventHandler(object sender, XmlNodeEventArgs e);
/// <include file='doc\_Events.uex' path='docs/doc[@for="XmlNodeEventArgs"]/*' />
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
public class XmlNodeEventArgs : EventArgs {
object o;
XmlNode xmlNode;
int lineNumber;
int linePosition;
internal XmlNodeEventArgs(XmlNode xmlNode, int lineNumber, int linePosition, object o) {
this.o = o;
this.xmlNode = xmlNode;
this.lineNumber = lineNumber;
this.linePosition = linePosition;
}
/// <include file='doc\_Events.uex' path='docs/doc[@for="XmlNodeEventArgs.ObjectBeingDeserialized"]/*' />
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
public object ObjectBeingDeserialized {
get { return o; }
}
/// <include file='doc\_Events.uex' path='docs/doc[@for="XmlNodeEventArgs.NodeType"]/*' />
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
public XmlNodeType NodeType {
get { return xmlNode.NodeType; }
}
/// <include file='doc\_Events.uex' path='docs/doc[@for="XmlNodeEventArgs.Name"]/*' />
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
public string Name {
get { return xmlNode.Name; }
}
/// <include file='doc\_Events.uex' path='docs/doc[@for="XmlNodeEventArgs.LocalName"]/*' />
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
public string LocalName {
get { return xmlNode.LocalName; }
}
/// <include file='doc\_Events.uex' path='docs/doc[@for="XmlNodeEventArgs.NamespaceURI"]/*' />
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
public string NamespaceURI {
get { return xmlNode.NamespaceURI; }
}
/// <include file='doc\_Events.uex' path='docs/doc[@for="XmlNodeEventArgs.Text"]/*' />
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
public string Text {
get { return xmlNode.Value; }
}
/// <include file='doc\_Events.uex' path='docs/doc[@for="XmlNodeEventArgs.LineNumber"]/*' />
/// <devdoc>
/// <para>
/// Gets the current line number.
/// </para>
/// </devdoc>
public int LineNumber {
get { return lineNumber; }
}
/// <include file='doc\_Events.uex' path='docs/doc[@for="XmlNodeEventArgs.LinePosition"]/*' />
/// <devdoc>
/// <para>
/// Gets the current line position.
/// </para>
/// </devdoc>
public int LinePosition {
get { return linePosition; }
}
}
/// <include file='doc\_Events.uex' path='docs/doc[@for="UnreferencedObjectEventHandler"]/*' />
public delegate void UnreferencedObjectEventHandler(object sender, UnreferencedObjectEventArgs e);
/// <include file='doc\_Events.uex' path='docs/doc[@for="UnreferencedObjectEventArgs"]/*' />
public class UnreferencedObjectEventArgs : EventArgs {
object o;
string id;
/// <include file='doc\_Events.uex' path='docs/doc[@for="UnreferencedObjectEventArgs.UnreferencedObjectEventArgs"]/*' />
public UnreferencedObjectEventArgs(object o, string id) {
this.o = o;
this.id = id;
}
/// <include file='doc\_Events.uex' path='docs/doc[@for="UnreferencedObjectEventArgs.UnreferencedObject"]/*' />
public object UnreferencedObject {
get { return o; }
}
/// <include file='doc\_Events.uex' path='docs/doc[@for="UnreferencedObjectEventArgs.UnreferencedId"]/*' />
public string UnreferencedId {
get { return id; }
}
}
}
| 35.732558 | 128 | 0.539972 | [
"Apache-2.0"
] | 295007712/295007712.github.io | sourceCode/dotNet4.6/ndp/fx/src/Xml/System/Xml/Serialization/_Events.cs | 9,219 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
using Xamarin.CommunityToolkit.Extensions;
namespace Demo.UI
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class XctTouchTestPage : ContentPage
{
public ICommand BgTapCommand { get; set; }
public XctTouchTestPage()
{
InitializeComponent();
BgTapCommand = new Command(async () => {
await this.DisplayToastAsync("Background Clicked");
});
BindingContext = this;
}
private async void Button_Clicked(object sender, EventArgs e)
{
await DisplayAlert("Button", "Clicked", "Ok");
}
}
} | 23.5 | 69 | 0.641844 | [
"MIT"
] | yzbai/HB.FullStack.Demo | Demo/Demo/UI/XctTouchTestPage.xaml.cs | 848 | C# |
/*
* Created by SharpDevelop.
* User: JHSON
* Date: 2012-11-22
* Time: 오후 2:10
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
namespace Artn.Ilhwa.View.Dialog
{
partial class FormChainInputList
{
/// <summary>
/// Designer variable used to keep track of non-visual components.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Disposes resources used by the form.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing) {
if (components != null) {
components.Dispose();
}
}
base.Dispose(disposing);
}
/// <summary>
/// This method is required for Windows Forms designer support.
/// Do not change the method contents inside the source code editor. The Forms designer might
/// not be able to load this method if it was changed manually.
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.ListViewItem listViewItem1 = new System.Windows.Forms.ListViewItem("ddd");
System.Windows.Forms.ListViewItem listViewItem2 = new System.Windows.Forms.ListViewItem("asdss");
System.Windows.Forms.ListViewItem listViewItem3 = new System.Windows.Forms.ListViewItem("dfdfdf");
System.Windows.Forms.ListViewItem listViewItem4 = new System.Windows.Forms.ListViewItem("aaa");
System.Windows.Forms.ListViewItem listViewItem5 = new System.Windows.Forms.ListViewItem("ㄴㄹㄴㄹㄴㄹ");
this.button_MoveNext = new System.Windows.Forms.Button();
this.button_MovePrev = new System.Windows.Forms.Button();
this.button_Cancel = new System.Windows.Forms.Button();
this.button_OK = new System.Windows.Forms.Button();
this.listView_InputList = new System.Windows.Forms.ListView();
this.columnHeader_Code = new System.Windows.Forms.ColumnHeader();
this.columnHeader_Quantity = new System.Windows.Forms.ColumnHeader();
this.textBox_InputBarcode = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label_TotalQuantity = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// button_MoveNext
//
this.button_MoveNext.Font = new System.Drawing.Font("굴림", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.button_MoveNext.Location = new System.Drawing.Point(476, 270);
this.button_MoveNext.Name = "button_MoveNext";
this.button_MoveNext.Size = new System.Drawing.Size(51, 118);
this.button_MoveNext.TabIndex = 12;
this.button_MoveNext.Text = "▼";
this.button_MoveNext.UseVisualStyleBackColor = true;
this.button_MoveNext.Click += new System.EventHandler(this.Button_MoveNextClick);
//
// button_MovePrev
//
this.button_MovePrev.Font = new System.Drawing.Font("굴림", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.button_MovePrev.Location = new System.Drawing.Point(476, 104);
this.button_MovePrev.Name = "button_MovePrev";
this.button_MovePrev.Size = new System.Drawing.Size(51, 118);
this.button_MovePrev.TabIndex = 11;
this.button_MovePrev.Text = "▲";
this.button_MovePrev.UseVisualStyleBackColor = true;
this.button_MovePrev.Click += new System.EventHandler(this.Button_MovePrevClick);
//
// button_Cancel
//
this.button_Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.button_Cancel.Font = new System.Drawing.Font("굴림", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.button_Cancel.Location = new System.Drawing.Point(198, 407);
this.button_Cancel.Name = "button_Cancel";
this.button_Cancel.Size = new System.Drawing.Size(94, 35);
this.button_Cancel.TabIndex = 10;
this.button_Cancel.Text = "취소";
this.button_Cancel.UseVisualStyleBackColor = true;
//
// button_OK
//
this.button_OK.DialogResult = System.Windows.Forms.DialogResult.OK;
this.button_OK.Font = new System.Drawing.Font("굴림", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.button_OK.Location = new System.Drawing.Point(12, 407);
this.button_OK.Name = "button_OK";
this.button_OK.Size = new System.Drawing.Size(90, 35);
this.button_OK.TabIndex = 9;
this.button_OK.Text = "확인";
this.button_OK.UseVisualStyleBackColor = true;
this.button_OK.Click += new System.EventHandler(this.Button_OKClick);
//
// listView_InputList
//
this.listView_InputList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.columnHeader_Code,
this.columnHeader_Quantity});
this.listView_InputList.Font = new System.Drawing.Font("굴림", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.listView_InputList.FullRowSelect = true;
this.listView_InputList.GridLines = true;
listViewItem1.StateImageIndex = 0;
this.listView_InputList.Items.AddRange(new System.Windows.Forms.ListViewItem[] {
listViewItem1,
listViewItem2,
listViewItem3,
listViewItem4,
listViewItem5});
this.listView_InputList.Location = new System.Drawing.Point(12, 104);
this.listView_InputList.MultiSelect = false;
this.listView_InputList.Name = "listView_InputList";
this.listView_InputList.Size = new System.Drawing.Size(458, 284);
this.listView_InputList.TabIndex = 8;
this.listView_InputList.UseCompatibleStateImageBehavior = false;
this.listView_InputList.View = System.Windows.Forms.View.Details;
//
// columnHeader_Code
//
this.columnHeader_Code.Text = "바코드";
this.columnHeader_Code.Width = 344;
//
// columnHeader_Quantity
//
this.columnHeader_Quantity.Text = "개수";
this.columnHeader_Quantity.Width = 70;
//
// textBox_InputBarcode
//
this.textBox_InputBarcode.Font = new System.Drawing.Font("굴림", 18F);
this.textBox_InputBarcode.Location = new System.Drawing.Point(12, 35);
this.textBox_InputBarcode.Name = "textBox_InputBarcode";
this.textBox_InputBarcode.Size = new System.Drawing.Size(354, 35);
this.textBox_InputBarcode.TabIndex = 13;
this.textBox_InputBarcode.Click += new System.EventHandler(this.TextBox_InputBarcodeClick);
this.textBox_InputBarcode.TextChanged += new System.EventHandler(this.TextBox_InputBarcodeTextChanged);
//
// label1
//
this.label1.Font = new System.Drawing.Font("굴림", 15F, System.Drawing.FontStyle.Bold);
this.label1.Location = new System.Drawing.Point(12, 9);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(225, 23);
this.label1.TabIndex = 14;
this.label1.Text = "바코드 입력";
//
// label2
//
this.label2.Font = new System.Drawing.Font("굴림", 15F, System.Drawing.FontStyle.Bold);
this.label2.Location = new System.Drawing.Point(345, 413);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(94, 23);
this.label2.TabIndex = 15;
this.label2.Text = "총 개수: ";
//
// label_TotalQuantity
//
this.label_TotalQuantity.Font = new System.Drawing.Font("굴림", 15F, System.Drawing.FontStyle.Bold);
this.label_TotalQuantity.Location = new System.Drawing.Point(436, 413);
this.label_TotalQuantity.Name = "label_TotalQuantity";
this.label_TotalQuantity.Size = new System.Drawing.Size(94, 23);
this.label_TotalQuantity.TabIndex = 16;
this.label_TotalQuantity.Text = "0";
//
// FormChainInputList
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(534, 451);
this.Controls.Add(this.label_TotalQuantity);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.textBox_InputBarcode);
this.Controls.Add(this.button_MoveNext);
this.Controls.Add(this.button_MovePrev);
this.Controls.Add(this.button_Cancel);
this.Controls.Add(this.button_OK);
this.Controls.Add(this.listView_InputList);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "FormChainInputList";
this.Text = "FormChainInputList";
this.ResumeLayout(false);
this.PerformLayout();
}
private System.Windows.Forms.Label label_TotalQuantity;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox textBox_InputBarcode;
private System.Windows.Forms.ColumnHeader columnHeader_Quantity;
private System.Windows.Forms.ColumnHeader columnHeader_Code;
private System.Windows.Forms.ListView listView_InputList;
private System.Windows.Forms.Button button_OK;
private System.Windows.Forms.Button button_Cancel;
private System.Windows.Forms.Button button_MovePrev;
private System.Windows.Forms.Button button_MoveNext;
}
}
| 44.087805 | 153 | 0.733901 | [
"MIT"
] | thesoncriel/ilhwa.tm | Ilhwa_TM_Renewal/View/Dialog/FormChainInputList.Designer.cs | 9,130 | C# |
using System;
using System.Numerics;
using System.Runtime.Serialization;
namespace TPW.Data;
internal class BallFixture : IBall
{
private readonly BallsDataLayerAbstractApi owner;
public BallFixture(int ID, Vector2 position, float radius, float weight, Vector2 velocity, BallsDataLayerAbstractApi owner)
{
Position = position;
Velocity = velocity;
this.owner = owner;
Mass = weight;
Radius = radius;
this.ID = ID;
}
public Vector2 Position { get; set; }
public float Radius { get; set; }
public float Mass { get; set; }
public Vector2 Velocity { get; set; }
public int ID { get; }
public event EventHandler<OnBallPositionChangeEventArgs>? PositionChange;
public void Simulate()
{ }
public void GetObjectData(SerializationInfo info, StreamingContext context)
{
throw new NotImplementedException();
}
} | 26.264706 | 126 | 0.699888 | [
"MIT"
] | S1NU5-P1/MS-SS-TPW-Project | Logic.Tests/BallFixture.cs | 895 | C# |
using CommandLine;
namespace Improbable.OnlineServices.Common.Analytics
{
public interface IAnalyticsCommandLineArgs
{
[Option(AnalyticsCommandLineArgs.EndpointName, HelpText = "Endpoint for analytics to be sent to. If not provided, then analytics " +
"are disabled")]
string Endpoint { get; set; }
[Option(AnalyticsCommandLineArgs.AllowInsecureEndpointName, Default = false, HelpText = "If set, allows http URLs for the endpoint")]
bool AllowInsecureEndpoints { get; set; }
[Option(AnalyticsCommandLineArgs.ConfigPathName, HelpText = "Set the path for the analytics configuration file. If not set, default " +
"values are assumed for all analytics events.")]
string ConfigPath { get; set; }
[Option(AnalyticsCommandLineArgs.GcpKeyPathName, HelpText = "The path from which to load the GCP key for analytics reporting.")]
string GcpKeyPath { get; set; }
[Option(AnalyticsCommandLineArgs.EnvironmentName,
HelpText = "Must be one of: testing, staging, production, live. Allows endpoint to route " +
"analytics from different environments to different storage buckets.")]
string Environment { get; set; }
[Option(AnalyticsCommandLineArgs.SchemaName, HelpText = "The schema for the events that are being fired.", Default = "improbable")]
string EventSchema { get; set; }
}
}
| 50.1 | 143 | 0.662675 | [
"MIT"
] | improbable/online-services | services/csharp/Common/Analytics/IAnalyticsCommandLineArgs.cs | 1,503 | C# |
using UnityEngine;
public class HealthSystem : MonoBehaviour {
public int MaxHp = 20;
public int CurrentHp = 20;
public bool invulnerable;
public delegate void OnHealthChange(float percentage, GameObject GO);
public static event OnHealthChange onHealthChange;
void Start(){
SendUpdateEvent();
}
//substract health
public void SubstractHealth(int damage){
if(!invulnerable){
//reduce hp
CurrentHp = Mathf.Clamp(CurrentHp -= damage, 0, MaxHp);
//Health reaches 0
if (isDead()) gameObject.SendMessage("Death", SendMessageOptions.DontRequireReceiver);
}
//update Health Event
SendUpdateEvent();
}
//add health
public void AddHealth(int amount){
CurrentHp = Mathf.Clamp(CurrentHp += amount, 0, MaxHp);
SendUpdateEvent();
}
//health update event
void SendUpdateEvent(){
float CurrentHealthPercentage = 1f/MaxHp * CurrentHp;
if(onHealthChange != null) onHealthChange(CurrentHealthPercentage, gameObject);
}
//death
bool isDead(){
return CurrentHp == 0;
}
}
| 21.574468 | 89 | 0.725838 | [
"MIT"
] | CracyMaga/-Demo | Assets/BeatEmUp_GameTemplate3D/Scripts/Health/HealthSystem.cs | 1,016 | C# |
using Sepes.Common.Dto.Study;
using System.Threading.Tasks;
namespace Sepes.Infrastructure.Service.DataModelService.Interface
{
public interface IStudyResultsAndLearningsModelService
{
Task<StudyResultsAndLearningsDto> GetAsync(int studyId);
}
}
| 24.454545 | 65 | 0.780669 | [
"MIT"
] | equinor/sepes | src/Sepes.Infrastructure/Service/DataModelService/Interface/IStudyResultsAndLearningsModelService.cs | 271 | C# |
using FluentAssertions;
using Moq;
using NUnit.Framework;
using SFA.DAS.MA.Shared.UI.Configuration;
using SFA.DAS.MA.Shared.UI.Models;
using SFA.DAS.MA.Shared.UI.Models.Links;
using System;
using System.Linq;
namespace SFA.DAS.MA.Shared.UI.UnitTest.FooterViewModel
{
[TestFixture]
public class WhenCreated
{
private IFooterViewModel _sut;
private Mock<IFooterConfiguration> _mockFooterConfiguration;
private Mock<IUserContext> _mockUserContext;
[SetUp]
public void Setup()
{
_mockFooterConfiguration = new Mock<IFooterConfiguration>();
_mockUserContext = new Mock<IUserContext>();
}
[Test]
public void ThenHelpFooterLinkIsInitialised()
{
// arrange
var testManageApprenticeshipsBaseUrl = $"http://{Guid.NewGuid()}";
_mockFooterConfiguration
.Setup(m => m.ManageApprenticeshipsBaseUrl)
.Returns(testManageApprenticeshipsBaseUrl);
// act
_sut = new Models.FooterViewModel(_mockFooterConfiguration.Object, _mockUserContext.Object);
// assert
_sut.Links.OfType<Help>().Where(t => t.Href.Equals($"{testManageApprenticeshipsBaseUrl}/service/help")).Count().Should().Be(1);
}
[Test]
public void ThenFeedbackFooterLinkIsInitialised()
{
// arrange
// act
_sut = new Models.FooterViewModel(_mockFooterConfiguration.Object, _mockUserContext.Object);
// assert
_sut.Links.OfType<Feedback>().Where(t => t.Href.Equals("https://www.smartsurvey.co.uk/s/apprenticeshipservicefeedback/")).Count().Should().Be(1);
}
[Test]
public void ThenBuiltByFooterLinkIsInitialised()
{
// arrange
// act
_sut = new Models.FooterViewModel(_mockFooterConfiguration.Object, _mockUserContext.Object);
// assert
_sut.Links.OfType<BuiltBy>().Where(t => t.Href.Equals("http://gov.uk/esfa")).Count().Should().Be(1);
}
[Test]
public void ThenOpenGovernmentLicenseFooterLinkIsInitialised()
{
// arrange
// act
_sut = new Models.FooterViewModel(_mockFooterConfiguration.Object, _mockUserContext.Object);
// assert
_sut.Links.OfType<OpenGovernmentLicense>().Where(t => t.Href.Equals("https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/")).Count().Should().Be(1);
}
[Test]
public void ThenOpenGovernmentLicenseV3FooterLinkIsInitialised()
{
// arrange
// act
_sut = new Models.FooterViewModel(_mockFooterConfiguration.Object, _mockUserContext.Object);
// assert
_sut.Links.OfType<OpenGovernmentLicenseV3>().Where(t => t.Href.Equals("https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/")).Count().Should().Be(1);
}
[Test]
public void ThenCrownCopyrightFooterLinkIsInitialised()
{
// arrange
// act
_sut = new Models.FooterViewModel(_mockFooterConfiguration.Object, _mockUserContext.Object);
// assert
_sut.Links.OfType<CrownCopyright>().Where(t => t.Href.Equals("https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/")).Count().Should().Be(1);
}
[Test]
public void ThenPrivacyFooterLinkIsInitialised()
{
// arrange
var testManageApprenticeshipsBaseUrl = $"http://{Guid.NewGuid()}";
var testHashedAccountId = Guid.NewGuid().ToString();
_mockFooterConfiguration
.Setup(m => m.ManageApprenticeshipsBaseUrl)
.Returns(testManageApprenticeshipsBaseUrl);
_mockUserContext
.Setup(m => m.HashedAccountId)
.Returns(testHashedAccountId);
// act
_sut = new Models.FooterViewModel(_mockFooterConfiguration.Object, _mockUserContext.Object);
// assert
_sut.Links.OfType<Privacy>().Where(t => t.Href.Equals($"{testManageApprenticeshipsBaseUrl}/service/{testHashedAccountId}/privacy")).Count().Should().Be(1);
}
[Test]
public void ThenWhenUserContextHasAHashedAccountIdTheCookiesFooterLinkIsInitialised()
{
// arrange
var testManageApprenticeshipsBaseUrl = $"http://{Guid.NewGuid()}";
var testHashedAccountId = Guid.NewGuid().ToString();
_mockFooterConfiguration
.Setup(m => m.ManageApprenticeshipsBaseUrl)
.Returns(testManageApprenticeshipsBaseUrl);
_mockUserContext
.Setup(m => m.HashedAccountId)
.Returns(testHashedAccountId);
// act
_sut = new Models.FooterViewModel(_mockFooterConfiguration.Object, _mockUserContext.Object);
// assert
_sut.Links.OfType<Cookies>().Where(t => t.Href.Equals($"{testManageApprenticeshipsBaseUrl}/accounts/{testHashedAccountId}/cookieConsent")).Count().Should().Be(1);
}
[Test]
public void ThenWhenUserContextDoesNotHaveAHashedAccountIdTheCookiesFooterLinkIsInitialised()
{
// arrange
var testManageApprenticeshipsBaseUrl = $"http://{Guid.NewGuid()}";
_mockFooterConfiguration
.Setup(m => m.ManageApprenticeshipsBaseUrl)
.Returns(testManageApprenticeshipsBaseUrl);
// act
_sut = new Models.FooterViewModel(_mockFooterConfiguration.Object, _mockUserContext.Object);
// assert
_sut.Links.OfType<Cookies>().Where(t => t.Href.Equals($"{testManageApprenticeshipsBaseUrl}/cookieConsent")).Count().Should().Be(1);
}
}
}
| 38.29375 | 245 | 0.61025 | [
"MIT"
] | uk-gov-mirror/SkillsFundingAgency.das-shared-packages | SFA.DAS.MA.Shared.UI/SFA.DAS.MA.Shared.UI.UnitTest/FooterViewModel/WhenCreated.cs | 6,129 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Demo.Migrations
{
class Logger
{
public static void LogMessage(string message, bool isError = false)
{
Console.ForegroundColor = isError ? ConsoleColor.Red : ConsoleColor.Green;
Console.WriteLine(message);
Console.ResetColor();
}
}
}
| 22.842105 | 86 | 0.656682 | [
"MIT"
] | glav/DbMigrationsDemo | Customisations/Logger.cs | 436 | C# |
using System;
using System.IO;
using System.Linq;
using OfficeRibbonXEditor.Documents;
namespace OfficeRibbonXEditor.ViewModels.Documents
{
public class OfficeDocumentViewModel : TreeViewItemViewModel, IDisposable
{
private OfficeDocument document;
private bool partsAddedOrRemoved;
private bool disposed;
public OfficeDocumentViewModel(OfficeDocument document)
: base(null, false, false)
{
this.document = document;
this.LoadParts();
}
public OfficeDocument Document => this.document;
public override string Name => Path.GetFileName(this.document.Name);
/// <summary>
/// Gets a value indicating whether any of the parts of this document has unsaved changes.
/// </summary>
public bool HasUnsavedChanges
{
get
{
if (this.partsAddedOrRemoved)
{
return true;
}
foreach (var child in this.Children)
{
if (child is OfficePartViewModel part && part.HasUnsavedChanges)
{
return true;
}
}
return false;
}
}
public string? ImageSource // TODO: Use the actual ImagesResource file somehow
{
get
{
switch (this.document.FileType)
{
case OfficeApplication.Excel:
return "/Resources/Images/excelwkb.png";
case OfficeApplication.PowerPoint:
return "/Resources/Images/pptpre.png";
case OfficeApplication.Word:
return "/Resources/Images/worddoc.png";
case OfficeApplication.Visio:
return "/Resources/Images/visiodoc.png";
case OfficeApplication.Xml:
return "/Resources/Images/xml.png";
default:
return null;
}
}
}
/// <summary>
/// Reloads the associated Office document, but keeping the OfficeParts currently shown in the GUI. This
/// ensures that, if the files have been modified externally, the program is still looking at their latest
/// version. Otherwise, we might accidentally lose those external changes when saving
/// </summary>
public void Reload()
{
// Store the file name (otherwise, it will have been erased after calling Dispose)
var fileName = this.document.Name;
// Dispose current document (not needed as references to its parts are stored in their View models anyway)
this.document.Dispose();
// Then, reload it
this.document = new OfficeDocument(fileName);
// Delete all its original parts
foreach (var type in Enum.GetValues(typeof(XmlPart)).OfType<XmlPart>())
{
this.document.RemoveCustomPart(type);
}
// Instead, use the parts currently shown in the editor
foreach (var part in this.Children.OfType<OfficePartViewModel>())
{
if (part.Part == null)
{
continue;
}
this.document.SaveCustomPart(part.Part.PartType, part.OriginalContents, true);
// Re-map the Part. This ensures that the PackagePart stored internally in OfficePart points to
// the right location, in case it is needed
part.Reload();
}
}
public void Save(bool reloadFirst = false, string? fileName = null, bool preserveAttributes = true)
{
if (reloadFirst)
{
this.Reload();
}
// Save each individual part
foreach (var part in this.Children.OfType<OfficePartViewModel>())
{
part.Save();
}
// Now save the actual document
this.document.Save(fileName, preserveAttributes);
// The save operation closes the internal package and re-opens it. Hence, parts need to be re-mapped
foreach (var part in this.Children.OfType<OfficePartViewModel>())
{
if (part.Part == null)
{
continue;
}
part.Part = this.document.RetrieveCustomPart(part.Part.PartType);
}
this.partsAddedOrRemoved = false;
}
public void InsertPart(XmlPart type)
{
// Check if the part does not exist yet
var part = this.document.RetrieveCustomPart(type);
if (part != null)
{
return;
}
part = this.document.CreateCustomPart(type);
var partModel = new OfficePartViewModel(part, this);
this.Children.Add(partModel);
partModel.IsSelected = true;
this.partsAddedOrRemoved = true;
}
public void RemovePart(XmlPart type)
{
this.document.RemoveCustomPart(type);
this.partsAddedOrRemoved = true;
for (var i = 0; i < this.Children.Count; ++i)
{
if (!(this.Children[i] is OfficePartViewModel part) || part.Part == null)
{
continue;
}
if (part.Part.PartType == type)
{
this.Children.RemoveAt(i);
return;
}
}
}
protected override void LoadChildren()
{
this.LoadParts();
}
private void LoadParts()
{
foreach (var part in this.document.Parts ?? Enumerable.Empty<OfficePart>())
{
this.Children.Add(new OfficePartViewModel(part, this));
}
}
public void Dispose()
{
this.Dispose(true);
GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing)
{
if (this.disposed)
{
return;
}
if (disposing)
{
this.document?.Dispose();
}
this.disposed = true;
}
}
}
| 31.198113 | 118 | 0.505292 | [
"MIT"
] | bitaller/office-ribbonx-editor | src/OfficeRibbonXEditor/ViewModels/Documents/OfficeDocumentViewModel.cs | 6,616 | C# |
using System;
using System.ComponentModel;
namespace RtmpSharp
{
public static class TypeSerializer
{
public static void RegisterTypeConverters()
{
TypeDescriptor.AddAttributes(typeof(string), new TypeConverterAttribute(typeof(RtmpSharp.IO.TypeConverters.StringConverter)));
TypeDescriptor.AddAttributes(typeof(DateTime), new TypeConverterAttribute(typeof(RtmpSharp.IO.TypeConverters.DateConverter)));
TypeDescriptor.AddAttributes(typeof(double), new TypeConverterAttribute(typeof(RtmpSharp.IO.TypeConverters.DoubleConverter)));
}
}
}
| 38.0625 | 138 | 0.743842 | [
"MIT"
] | frostycpu/rtmp-sharp | rtmp-sharp/RtmpSharp.cs | 611 | C# |
// (c) Copyright HutongGames, LLC 2010-2021. All rights reserved.
// NOTE: The new Input System and legacy Input Manager can both be enabled in a project.
// This action was developed for the old input manager, so we will use it if its available.
// If only the new input system is available we will try to use that instead,
// but there might be subtle differences in the behaviour in the new system!
#if ENABLE_INPUT_SYSTEM && !ENABLE_LEGACY_INPUT_MANAGER
#define NEW_INPUT_SYSTEM_ONLY
#endif
using UnityEngine;
#if NEW_INPUT_SYSTEM_ONLY
using UnityEngine.InputSystem;
#endif
namespace HutongGames.PlayMaker.Actions
{
[ActionCategory(ActionCategory.Input)]
[Tooltip("Gets the Y Position of the mouse and stores it in a Float Variable.")]
public class GetMouseY : FsmStateAction
{
[RequiredField]
[UIHint(UIHint.Variable)]
[Tooltip("Store in a float variable.")]
public FsmFloat storeResult;
[Tooltip("Normalized coordinates are in the range 0 to 1 (0 = left, 1 = right). Otherwise the coordinate is in pixels. " +
"Normalized coordinates are useful for resolution independent functions.")]
public bool normalize;
[Tooltip("Repeat every frame.")]
public bool everyFrame;
public override void Reset()
{
storeResult = null;
normalize = true;
everyFrame = true;
}
public override void OnEnter()
{
DoGetMouseY();
if(!everyFrame)
{
Finish();
}
}
public override void OnUpdate()
{
DoGetMouseY();
}
void DoGetMouseY()
{
if (storeResult != null)
{
#if NEW_INPUT_SYSTEM_ONLY
if (Mouse.current == null) return;
var yPos = Mouse.current.position.ReadValue().y;
#else
var yPos = Input.mousePosition.y;
#endif
if (normalize)
{
yPos /= Screen.height;
}
storeResult.Value = yPos;
}
}
#if UNITY_EDITOR
public override string AutoName()
{
return ActionHelpers.AutoName(this, storeResult);
}
#endif
}
}
| 23.956044 | 130 | 0.624771 | [
"MIT"
] | euphoriaer/Roguelike-fantasy | Project/ARMRP-unity/Assets/ThirdParty/PlayMaker/Actions/Input/GetMouseY.cs | 2,180 | C# |
using System.IO;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace VRCPrefabs.PlaylistManager
{
public class PlaylistItem
{
public string Name { get; set; }
public string Slug { get; set; }
public string Path { get; set; }
public string Contents { get; set; }
public FileInfo File { get; set; }
public bool isSelected { get; set; }
}
} | 24.277778 | 44 | 0.638444 | [
"MIT"
] | PhaxeNor/VRC-Playlist-Manager | VRCPrefabs/PlaylistManager/Editor/PlaylistItem.cs | 439 | C# |
//
// System.DrawingCore.ImageConverter.cs
//
// Author:
// Dennis Hayes (dennish@Raytek.com)
// Sanjay Gupta (gsanjay@novell.com)
//
// (C) 2002 Ximian, Inc
//
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.ComponentModel;
using System.Globalization;
using System.IO;
using System.DrawingCore.Imaging;
namespace System.DrawingCore
{
/// <summary>
/// Summary description for ImageConverter.
/// </summary>
public class ImageConverter : TypeConverter
{
public ImageConverter ()
{
}
public override bool CanConvertFrom (ITypeDescriptorContext context, Type sourceType)
{
if (sourceType == typeof (System.Byte []))
return true;
else
return false;
}
public override bool CanConvertTo (ITypeDescriptorContext context, Type destinationType)
{
if ((destinationType == typeof (System.Byte [])) || (destinationType == typeof (System.String)))
return true;
else
return false;
}
public override object ConvertFrom (ITypeDescriptorContext context, CultureInfo culture, object value)
{
byte [] bytes = value as byte [];
if (bytes == null)
return base.ConvertFrom (context, culture, value);
MemoryStream ms = new MemoryStream (bytes);
return Image.FromStream (ms);
}
public override object ConvertTo (ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
{
if (value == null)
return "(none)";
if (value is System.DrawingCore.Image) {
if (destinationType == typeof (string)) {
return value.ToString ();
} else if (CanConvertTo (null, destinationType)) {
//came here means destinationType is byte array ;
MemoryStream ms = new MemoryStream ();
((Image)value).Save (ms, ((Image)value).RawFormat);
return ms.GetBuffer ();
}
}
string msg = string.Format ("ImageConverter can not convert from type '{0}'.", value.GetType ());
throw new NotSupportedException (msg);
}
public override PropertyDescriptorCollection GetProperties (ITypeDescriptorContext context, object value, Attribute[] attributes)
{
return TypeDescriptor.GetProperties (typeof (Image), attributes);
}
public override bool GetPropertiesSupported (ITypeDescriptorContext context )
{
return true;
}
}
}
| 31.119266 | 131 | 0.716981 | [
"Apache-2.0"
] | JuanSGA24/Alejandria | source/Samples/deprecated/MyThaiStar/reporting/ZKWeb.System.Drawing/System.Drawing/ImageConverter.cs | 3,392 | C# |
using System;
using System.Collections.Generic;
using System.IO;
namespace Rebus.AwsSnsAndSqsPerformanceTest.Markdown
{
public class TableControl : IMarkDownControl
{
public string Id { get; set; } = nameof(TableControl);
private readonly List<TableCellControl> _tableColumns = new List<TableCellControl>();
private readonly List<List<TableCellControl>> _tableRows = new List<List<TableCellControl>>();
public void AddColumn(TableCellControl cellControl)
{
_tableColumns.Add(cellControl);
}
public void AddRow(List<TableCellControl> rowData, bool throwIfColumnCountDoesNotMatchRowCount = true)
{
if (throwIfColumnCountDoesNotMatchRowCount && rowData?.Count != _tableColumns?.Count)
{
throw new ArgumentOutOfRangeException(nameof(rowData), $"Row cellControl count:{rowData?.Count} does not match the column count:{_tableColumns?.Count}");
}
_tableRows.Add(rowData);
}
internal void AddColumn(string text)
{
_tableColumns.Add(new TableCellControl(text));
}
public void Write(Stream ste)
{
bool isFirstColumn = true;
foreach (var column in _tableColumns)
{
if (isFirstColumn == false)
{
TextControl.Space.Write(ste);
TextControl.Pipe.Write(ste);
TextControl.Space.Write(ste);
}
else
{
isFirstColumn = false;
}
column.Write(ste);
}
TextControl.Newline.Write(ste);
isFirstColumn = true;
for (var i = 0; i < _tableColumns.Count; i++)
{
if (isFirstColumn == false)
{
TextControl.Space.Write(ste);
TextControl.Pipe.Write(ste);
TextControl.Space.Write(ste);
}
else
{
isFirstColumn = false;
}
TextControl.Hyphen.Write(ste);
TextControl.Hyphen.Write(ste);
}
TextControl.Newline.Write(ste);
foreach (var tableRow in _tableRows)
{
isFirstColumn = true;
foreach (var tableCellControl in tableRow)
{
if (isFirstColumn == false)
{
TextControl.Space.Write(ste);
TextControl.Pipe.Write(ste);
TextControl.Space.Write(ste);
}
else
{
isFirstColumn = false;
}
tableCellControl.Write(ste);
}
TextControl.Newline.Write(ste);
}
}
}
} | 30.59596 | 169 | 0.48861 | [
"MIT"
] | P47Phoenix/Rebus.AwsSnsAndSqs | Rebus.AwsSnsAndSqsPerformanceTest/Markdown/TableControl.cs | 3,031 | C# |
using Amazon.JSII.Runtime.Deputy;
namespace Amazon.JSII.Tests.CalculatorNamespace
{
/// <remarks>
/// stability: Experimental
/// </remarks>
[JsiiInterface(nativeType: typeof(IBell), fullyQualifiedName: "jsii-calc.IBell")]
public interface IBell
{
/// <remarks>
/// stability: Experimental
/// </remarks>
[JsiiMethod(name: "ring")]
void Ring();
}
}
| 23.222222 | 85 | 0.602871 | [
"Apache-2.0"
] | NyanKiyoshi/jsii | packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IBell.cs | 418 | C# |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("MultiThread")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MultiThread")]
[assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("e644b214-ebf2-43bf-b5f8-044ac7ed31fe")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
| 37.702703 | 84 | 0.744803 | [
"MIT"
] | PurwantoGZ/XamarinProject | MultiThread/MultiThread/Properties/AssemblyInfo.cs | 1,398 | C# |
using Amazon.DynamoDBv2.Model;
using Amazon.Util;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Newtonsoft.Json;
using Newtonsoft.Json.Bson;
using WorkflowCore.Models;
namespace WorkflowCore.Providers.AWS
{
internal static class ModelExtensions
{
private static JsonSerializerSettings SerializerSettings = new JsonSerializerSettings() { TypeNameHandling = TypeNameHandling.All };
public static Dictionary<string, AttributeValue> ToDynamoMap(this WorkflowInstance source)
{
var result = new Dictionary<string, AttributeValue>();
result["id"] = new AttributeValue(source.Id);
result["workflow_definition_id"] = new AttributeValue(source.WorkflowDefinitionId);
result["version"] = new AttributeValue(source.Version.ToString());
result["next_execution"] = new AttributeValue() { N = (source.NextExecution ?? 0).ToString() };
result["create_time"] = new AttributeValue() { N = source.CreateTime.Ticks.ToString() };
result["data"] = new AttributeValue(JsonConvert.SerializeObject(source.Data, SerializerSettings));
result["workflow_status"] = new AttributeValue() { N = Convert.ToInt32(source.Status).ToString() };
if (!string.IsNullOrEmpty(source.Description))
result["description"] = new AttributeValue(source.Description);
if (!string.IsNullOrEmpty(source.Reference))
result["reference"] = new AttributeValue(source.Reference);
if (source.CompleteTime.HasValue)
result["complete_time"] = new AttributeValue() { N = source.CompleteTime.Value.Ticks.ToString() };
var pointers = new List<AttributeValue>();
foreach (var pointer in source.ExecutionPointers)
{
pointers.Add(new AttributeValue(JsonConvert.SerializeObject(pointer, SerializerSettings)));
}
result["pointers"] = new AttributeValue() { L = pointers };
if (source.Status == WorkflowStatus.Runnable)
result["runnable"] = new AttributeValue() { N = 1.ToString() };
return result;
}
public static WorkflowInstance ToWorkflowInstance(this Dictionary<string, AttributeValue> source)
{
var result = new WorkflowInstance()
{
Id = source["id"].S,
WorkflowDefinitionId = source["workflow_definition_id"].S,
Version = Convert.ToInt32(source["version"].S),
Status = (WorkflowStatus)Convert.ToInt32(source["workflow_status"].N),
NextExecution = Convert.ToInt64(source["next_execution"].N),
CreateTime = new DateTime(Convert.ToInt64(source["create_time"].N)),
Data = JsonConvert.DeserializeObject(source["data"].S, SerializerSettings)
};
if (source.ContainsKey("description"))
result.Description = source["description"].S;
if (source.ContainsKey("reference"))
result.Reference = source["reference"].S;
if (source.ContainsKey("complete_time"))
result.CompleteTime = new DateTime(Int64.Parse(source["complete_time"].N));
foreach (var pointer in source["pointers"].L)
{
var ep = JsonConvert.DeserializeObject<ExecutionPointer>(pointer.S, SerializerSettings);
result.ExecutionPointers.Add(ep);
}
return result;
}
public static Dictionary<string, AttributeValue> ToDynamoMap(this EventSubscription source)
{
return new Dictionary<string, AttributeValue>
{
["id"] = new AttributeValue(source.Id),
["event_name"] = new AttributeValue(source.EventName),
["event_key"] = new AttributeValue(source.EventKey),
["workflow_id"] = new AttributeValue(source.WorkflowId),
["step_id"] = new AttributeValue(source.StepId.ToString()),
["subscribe_as_of"] = new AttributeValue() { N = source.SubscribeAsOf.Ticks.ToString() },
["subscription_data"] = new AttributeValue(JsonConvert.SerializeObject(source.SubscriptionData, SerializerSettings)),
["event_slug"] = new AttributeValue($"{source.EventName}:{source.EventKey}")
};
}
public static EventSubscription ToEventSubscription(this Dictionary<string, AttributeValue> source)
{
return new EventSubscription()
{
Id = source["id"].S,
EventName = source["event_name"].S,
EventKey = source["event_key"].S,
WorkflowId = source["workflow_id"].S,
StepId = Convert.ToInt32(source["step_id"].S),
SubscribeAsOf = new DateTime(Convert.ToInt64(source["subscribe_as_of"].N)),
SubscriptionData = JsonConvert.DeserializeObject(source["subscription_data"].S, SerializerSettings)
};
}
public static Dictionary<string, AttributeValue> ToDynamoMap(this Event source)
{
var result = new Dictionary<string, AttributeValue>
{
["id"] = new AttributeValue(source.Id),
["event_name"] = new AttributeValue(source.EventName),
["event_key"] = new AttributeValue(source.EventKey),
["event_data"] = new AttributeValue(JsonConvert.SerializeObject(source.EventData, SerializerSettings)),
["event_time"] = new AttributeValue() { N = source.EventTime.Ticks.ToString() },
["event_slug"] = new AttributeValue($"{source.EventName}:{source.EventKey}")
};
if (!source.IsProcessed)
result["not_processed"] = new AttributeValue() { N = 1.ToString() };
return result;
}
public static Event ToEvent(this Dictionary<string, AttributeValue> source)
{
var result = new Event()
{
Id = source["id"].S,
EventName = source["event_name"].S,
EventKey = source["event_key"].S,
EventData = JsonConvert.DeserializeObject(source["event_data"].S, SerializerSettings),
EventTime = new DateTime(Convert.ToInt64(source["event_time"].N)),
IsProcessed = (!source.ContainsKey("not_processed"))
};
return result;
}
}
} | 45.648276 | 140 | 0.603414 | [
"MIT"
] | cocytus/workflow-core | src/providers/WorkflowCore.Providers.AWS/ModelExtensions.cs | 6,621 | C# |
/*
* ARXivar Workflow API
*
* ARXivar Workflow API
*
* OpenAPI spec version: v1
* Contact: info@abletech.it
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*/
using System;
using System.Linq;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Runtime.Serialization;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.ComponentModel.DataAnnotations;
using SwaggerDateConverter = IO.Swagger.Workflow.Client.SwaggerDateConverter;
namespace IO.Swagger.Workflow.Model
{
/// <summary>
/// Create outcome group model
/// </summary>
[DataContract]
public partial class OutcomeGroupsCreateRm : IEquatable<OutcomeGroupsCreateRm>
{
/// <summary>
/// Initializes a new instance of the <see cref="OutcomeGroupsCreateRm" /> class.
/// </summary>
/// <param name="name">Outcome group name (required).</param>
/// <param name="parentId">Parent identifier.</param>
public OutcomeGroupsCreateRm(string name = default(string), Guid? parentId = default(Guid?))
{
// to ensure "name" is required (not null)
if (name == null)
{
throw new InvalidDataException("name is a required property for OutcomeGroupsCreateRm and cannot be null");
}
else
{
this.Name = name;
}
this.ParentId = parentId;
}
/// <summary>
/// Outcome group name
/// </summary>
/// <value>Outcome group name</value>
[DataMember(Name="name", EmitDefaultValue=false)]
public string Name { get; set; }
/// <summary>
/// Parent identifier
/// </summary>
/// <value>Parent identifier</value>
[DataMember(Name="parentId", EmitDefaultValue=false)]
public Guid? ParentId { get; set; }
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
var sb = new StringBuilder();
sb.Append("class OutcomeGroupsCreateRm {\n");
sb.Append(" Name: ").Append(Name).Append("\n");
sb.Append(" ParentId: ").Append(ParentId).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="input">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object input)
{
return this.Equals(input as OutcomeGroupsCreateRm);
}
/// <summary>
/// Returns true if OutcomeGroupsCreateRm instances are equal
/// </summary>
/// <param name="input">Instance of OutcomeGroupsCreateRm to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(OutcomeGroupsCreateRm input)
{
if (input == null)
return false;
return
(
this.Name == input.Name ||
(this.Name != null &&
this.Name.Equals(input.Name))
) &&
(
this.ParentId == input.ParentId ||
(this.ParentId != null &&
this.ParentId.Equals(input.ParentId))
);
}
/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.Name != null)
hashCode = hashCode * 59 + this.Name.GetHashCode();
if (this.ParentId != null)
hashCode = hashCode * 59 + this.ParentId.GetHashCode();
return hashCode;
}
}
}
}
| 32.45 | 123 | 0.548536 | [
"Apache-2.0"
] | zanardini/ARXivarNext-WebApi | ARXivarNext-ConsumingWebApi/IO.Swagger.Workflow/Model/OutcomeGroupsCreateRm.cs | 4,543 | C# |
using System.Diagnostics.CodeAnalysis;
using Replikit.Abstractions.Adapters.Exceptions;
namespace Replikit.Abstractions.Adapters.Services;
public static class AdapterServiceProviderExtensions
{
public static bool Supports<TService>(this IAdapterServiceProvider serviceProvider)
{
ArgumentNullException.ThrowIfNull(serviceProvider);
return serviceProvider.GetService(typeof(TService)) is not null;
}
public static bool TryGetService<TService>(this IAdapterServiceProvider serviceProvider,
[NotNullWhen(true)] out TService? feature)
{
ArgumentNullException.ThrowIfNull(serviceProvider);
feature = (TService?) serviceProvider.GetService(typeof(TService));
return feature is not null;
}
public static object GetRequiredService(this IAdapterServiceProvider serviceProvider, Type serviceType)
{
ArgumentNullException.ThrowIfNull(serviceProvider);
ArgumentNullException.ThrowIfNull(serviceType);
return serviceProvider.GetService(serviceType) ??
throw new AdapterServiceNotImplementedException(serviceProvider, serviceType);
}
public static TService GetRequiredService<TService>(this IAdapterServiceProvider serviceProvider)
{
return (TService) GetRequiredService(serviceProvider, typeof(TService));
}
}
| 35.473684 | 107 | 0.761128 | [
"MIT"
] | Replikit/Replikit | src/core/Replikit.Abstractions/src/Adapters/Services/AdapterServiceProviderExtensions.cs | 1,348 | C# |
using System.Text.RegularExpressions;
namespace Encel.ContentTransformers.Markdown
{
public class MarkdownConverter
{
const string CODE_BLOCK_WITH_LANGUAGE = "<pre><code class=\"{0}\">{1}</code></pre>";
const string CODE_BLOCK = "<pre><code>{0}</code></pre>";
const string CODE_LANGUAGE_PATTERN = @"\{language-(\w+)\}";
const string WHITESPACE_PATTERN = @"\s*";
private MarkdownDeep.Markdown _markdown;
public MarkdownConverter()
{
_markdown = new MarkdownDeep.Markdown
{
ExtraMode = true,
HtmlClassTitledImages = "Figure",
FormatCodeBlock = FormatCodeBlock,
};
}
public virtual string GetFileExtension()
{
return "md";
}
public virtual string Convert(string source)
{
return _markdown.Transform(source);
}
private string FormatCodeBlock(MarkdownDeep.Markdown markdown, string code)
{
var match = Regex.Match(code, CODE_LANGUAGE_PATTERN, RegexOptions.Compiled | RegexOptions.IgnoreCase);
if (match.Success)
{
// get the language name
var language = match.Groups[1].Value;
// remove language tag from code
code = Regex.Replace(code, WHITESPACE_PATTERN + CODE_LANGUAGE_PATTERN + WHITESPACE_PATTERN, string.Empty, RegexOptions.Compiled | RegexOptions.IgnoreCase);
// wrap code in pre and code tags with correct class name
return string.Format(CODE_BLOCK_WITH_LANGUAGE, "language-" + language, code);
}
return string.Format(CODE_BLOCK, code);
}
}
} | 33.339623 | 171 | 0.589134 | [
"MIT"
] | encel/Encel | Encel/ContentTransformers/Markdown/MarkdownConverter.cs | 1,769 | C# |
namespace SimplCommerce.Module.News.ViewModels
{
public class NewsCategoryVm
{
public long Id { get; set; }
public string SeoTitle { get; set; }
public string Name { get; set; }
}
}
| 18.416667 | 47 | 0.60181 | [
"Apache-2.0"
] | IevgenZub/SimplCommerce | src/Modules/SimplCommerce.Module.News/ViewModels/NewsCategoryVm.cs | 223 | C# |
// <auto-generated>
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>
namespace Gov.Lclb.Cllb.Interfaces
{
using Microsoft.Rest;
using Models;
using System.Collections;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
/// <summary>
/// Businessunitadoxioinspectorreport operations.
/// </summary>
public partial interface IBusinessunitadoxioinspectorreport
{
/// <summary>
/// Get business_unit_adoxio_inspectorreport from businessunits
/// </summary>
/// <param name='businessunitid'>
/// key: businessunitid of businessunit
/// </param>
/// <param name='top'>
/// </param>
/// <param name='skip'>
/// </param>
/// <param name='search'>
/// </param>
/// <param name='filter'>
/// </param>
/// <param name='count'>
/// </param>
/// <param name='orderby'>
/// Order items by property values
/// </param>
/// <param name='select'>
/// Select properties to be returned
/// </param>
/// <param name='expand'>
/// Expand related entities
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="Microsoft.Rest.HttpOperationException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<HttpOperationResponse<MicrosoftDynamicsCRMadoxioInspectorreportCollection>> GetWithHttpMessagesAsync(string businessunitid, int? top = default(int?), int? skip = default(int?), string search = default(string), string filter = default(string), bool? count = default(bool?), IList<string> orderby = default(IList<string>), IList<string> select = default(IList<string>), IList<string> expand = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Get business_unit_adoxio_inspectorreport from businessunits
/// </summary>
/// <param name='businessunitid'>
/// key: businessunitid of businessunit
/// </param>
/// <param name='adoxioInspectorreportid'>
/// key: adoxio_inspectorreportid of adoxio_inspectorreport
/// </param>
/// <param name='select'>
/// Select properties to be returned
/// </param>
/// <param name='expand'>
/// Expand related entities
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="Microsoft.Rest.HttpOperationException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<HttpOperationResponse<MicrosoftDynamicsCRMadoxioInspectorreport>> InspectorreportByKeyWithHttpMessagesAsync(string businessunitid, string adoxioInspectorreportid, IList<string> select = default(IList<string>), IList<string> expand = default(IList<string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
| 45.4 | 550 | 0.610944 | [
"Apache-2.0"
] | BrendanBeachBC/jag-lcrb-carla-public | cllc-interfaces/Dynamics-Autorest/IBusinessunitadoxioinspectorreport.cs | 4,313 | C# |
// <copyright>
// Copyright Southeast Christian Church
//
// Licensed under the Southeast Christian Church License (the "License");
// you may not use this file except in compliance with the License.
// A copy of the License shoud be included with this file.
//
// 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.
// </copyright>
//
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace org.secc.Purchasing.DataLayer
{
using System.Data.Linq;
using System.Data.Linq.Mapping;
using System.Data;
using System.Collections.Generic;
using System.Reflection;
using System.Linq;
using System.Linq.Expressions;
using System.ComponentModel;
using System;
[global::System.Data.Linq.Mapping.DatabaseAttribute(Name="RockRMS")]
public partial class PurchasingContext : System.Data.Linq.DataContext
{
private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource();
#region Extensibility Method Definitions
partial void OnCreated();
partial void InsertHistoryData(HistoryData instance);
partial void UpdateHistoryData(HistoryData instance);
partial void DeleteHistoryData(HistoryData instance);
partial void InsertCampusData(CampusData instance);
partial void UpdateCampusData(CampusData instance);
partial void DeleteCampusData(CampusData instance);
partial void InsertPaymentMethodData(PaymentMethodData instance);
partial void UpdatePaymentMethodData(PaymentMethodData instance);
partial void DeletePaymentMethodData(PaymentMethodData instance);
partial void InsertPaymentCreditCardData(PaymentCreditCardData instance);
partial void UpdatePaymentCreditCardData(PaymentCreditCardData instance);
partial void DeletePaymentCreditCardData(PaymentCreditCardData instance);
partial void InsertRequisitionItemData(RequisitionItemData instance);
partial void UpdateRequisitionItemData(RequisitionItemData instance);
partial void DeleteRequisitionItemData(RequisitionItemData instance);
partial void InsertPurchaseOrderItemData(PurchaseOrderItemData instance);
partial void UpdatePurchaseOrderItemData(PurchaseOrderItemData instance);
partial void DeletePurchaseOrderItemData(PurchaseOrderItemData instance);
partial void InsertReceiptData(ReceiptData instance);
partial void UpdateReceiptData(ReceiptData instance);
partial void DeleteReceiptData(ReceiptData instance);
partial void InsertReceiptItemData(ReceiptItemData instance);
partial void UpdateReceiptItemData(ReceiptItemData instance);
partial void DeleteReceiptItemData(ReceiptItemData instance);
partial void InsertPaymentData(PaymentData instance);
partial void UpdatePaymentData(PaymentData instance);
partial void DeletePaymentData(PaymentData instance);
partial void InsertPaymentChargeData(PaymentChargeData instance);
partial void UpdatePaymentChargeData(PaymentChargeData instance);
partial void DeletePaymentChargeData(PaymentChargeData instance);
partial void InsertAttachmentData(AttachmentData instance);
partial void UpdateAttachmentData(AttachmentData instance);
partial void DeleteAttachmentData(AttachmentData instance);
partial void InsertNoteData(NoteData instance);
partial void UpdateNoteData(NoteData instance);
partial void DeleteNoteData(NoteData instance);
partial void InsertVendorData(VendorData instance);
partial void UpdateVendorData(VendorData instance);
partial void DeleteVendorData(VendorData instance);
partial void InsertPurchaseOrderData(PurchaseOrderData instance);
partial void UpdatePurchaseOrderData(PurchaseOrderData instance);
partial void DeletePurchaseOrderData(PurchaseOrderData instance);
partial void InsertRequisitionData(RequisitionData instance);
partial void UpdateRequisitionData(RequisitionData instance);
partial void DeleteRequisitionData(RequisitionData instance);
partial void InsertCapitalRequestBidData(CapitalRequestBidData instance);
partial void UpdateCapitalRequestBidData(CapitalRequestBidData instance);
partial void DeleteCapitalRequestBidData(CapitalRequestBidData instance);
partial void InsertApprovalData(ApprovalData instance);
partial void UpdateApprovalData(ApprovalData instance);
partial void DeleteApprovalData(ApprovalData instance);
partial void InsertCapitalRequestData(CapitalRequestData instance);
partial void UpdateCapitalRequestData(CapitalRequestData instance);
partial void DeleteCapitalRequestData(CapitalRequestData instance);
partial void InsertPersonData(PersonData instance);
partial void UpdatePersonData(PersonData instance);
partial void DeletePersonData(PersonData instance);
partial void InsertLookupData(LookupData instance);
partial void UpdateLookupData(LookupData instance);
partial void DeleteLookupData(LookupData instance);
partial void InsertPersonAliasData(PersonAliasData instance);
partial void UpdatePersonAliasData(PersonAliasData instance);
partial void DeletePersonAliasData(PersonAliasData instance);
#endregion
public PurchasingContext() :
base(global::org.secc.Purchasing.Properties.Settings.Default.RockRMSConnectionString, mappingSource)
{
OnCreated();
}
public PurchasingContext(string connection) :
base(connection, mappingSource)
{
OnCreated();
}
public PurchasingContext(System.Data.IDbConnection connection) :
base(connection, mappingSource)
{
OnCreated();
}
public PurchasingContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) :
base(connection, mappingSource)
{
OnCreated();
}
public PurchasingContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) :
base(connection, mappingSource)
{
OnCreated();
}
public System.Data.Linq.Table<HistoryData> HistoryDatas
{
get
{
return this.GetTable<HistoryData>();
}
}
public System.Data.Linq.Table<CampusData> CampusDatas
{
get
{
return this.GetTable<CampusData>();
}
}
public System.Data.Linq.Table<PaymentMethodData> PaymentMethodDatas
{
get
{
return this.GetTable<PaymentMethodData>();
}
}
public System.Data.Linq.Table<PaymentCreditCardData> PaymentCreditCardDatas
{
get
{
return this.GetTable<PaymentCreditCardData>();
}
}
public System.Data.Linq.Table<RequisitionItemData> RequisitionItemDatas
{
get
{
return this.GetTable<RequisitionItemData>();
}
}
public System.Data.Linq.Table<PurchaseOrderItemData> PurchaseOrderItemDatas
{
get
{
return this.GetTable<PurchaseOrderItemData>();
}
}
public System.Data.Linq.Table<ReceiptData> ReceiptDatas
{
get
{
return this.GetTable<ReceiptData>();
}
}
public System.Data.Linq.Table<ReceiptItemData> ReceiptItemDatas
{
get
{
return this.GetTable<ReceiptItemData>();
}
}
public System.Data.Linq.Table<PaymentData> PaymentDatas
{
get
{
return this.GetTable<PaymentData>();
}
}
public System.Data.Linq.Table<PaymentChargeData> PaymentChargeDatas
{
get
{
return this.GetTable<PaymentChargeData>();
}
}
public System.Data.Linq.Table<AttachmentData> AttachmentDatas
{
get
{
return this.GetTable<AttachmentData>();
}
}
public System.Data.Linq.Table<NoteData> NoteDatas
{
get
{
return this.GetTable<NoteData>();
}
}
public System.Data.Linq.Table<VendorData> VendorDatas
{
get
{
return this.GetTable<VendorData>();
}
}
public System.Data.Linq.Table<PurchaseOrderData> PurchaseOrderDatas
{
get
{
return this.GetTable<PurchaseOrderData>();
}
}
public System.Data.Linq.Table<RequisitionData> RequisitionDatas
{
get
{
return this.GetTable<RequisitionData>();
}
}
public System.Data.Linq.Table<CapitalRequestBidData> CapitalRequestBidDatas
{
get
{
return this.GetTable<CapitalRequestBidData>();
}
}
public System.Data.Linq.Table<ApprovalData> ApprovalDatas
{
get
{
return this.GetTable<ApprovalData>();
}
}
public System.Data.Linq.Table<CapitalRequestData> CapitalRequestDatas
{
get
{
return this.GetTable<CapitalRequestData>();
}
}
public System.Data.Linq.Table<PersonData> PersonDatas
{
get
{
return this.GetTable<PersonData>();
}
}
public System.Data.Linq.Table<LookupData> LookupDatas
{
get
{
return this.GetTable<LookupData>();
}
}
public System.Data.Linq.Table<PersonAliasData> PersonAliasDatas
{
get
{
return this.GetTable<PersonAliasData>();
}
}
[global::System.Data.Linq.Mapping.FunctionAttribute(Name="dbo.cust_secc_sp_get_personID_byPersonAttributeValue")]
public ISingleResult<cust_secc_sp_get_personID_byPersonAttributeValueResult> GetPersonIDsByAttributeValue([global::System.Data.Linq.Mapping.ParameterAttribute(DbType="Int")] System.Nullable<int> attribute_id, [global::System.Data.Linq.Mapping.ParameterAttribute(DbType="Int")] System.Nullable<int> int_value, [global::System.Data.Linq.Mapping.ParameterAttribute(DbType="VarChar(MAX)")] string varchar_value, [global::System.Data.Linq.Mapping.ParameterAttribute(DbType="DateTime")] System.Nullable<System.DateTime> datetime_value, [global::System.Data.Linq.Mapping.ParameterAttribute(DbType="Decimal(18,4)")] System.Nullable<decimal> decimal_value, [global::System.Data.Linq.Mapping.ParameterAttribute(Name="OrganizationID", DbType="Int")] System.Nullable<int> organizationID)
{
IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), attribute_id, int_value, varchar_value, datetime_value, decimal_value, organizationID);
return ((ISingleResult<cust_secc_sp_get_personID_byPersonAttributeValueResult>)(result.ReturnValue));
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo._org_secc_Purchasing_History")]
public partial class HistoryData : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _history_id;
private string _object_type_name;
private int _identifier;
private int _history_type;
private string _original_xml;
private string _updated_xml;
private int _organization_id;
private System.DateTime _date_created;
private string _created_by;
private System.DateTime _date_modified;
private string _modified_by;
private bool _active;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void Onhistory_idChanging(int value);
partial void Onhistory_idChanged();
partial void Onobject_type_nameChanging(string value);
partial void Onobject_type_nameChanged();
partial void OnidentifierChanging(int value);
partial void OnidentifierChanged();
partial void Onhistory_typeChanging(int value);
partial void Onhistory_typeChanged();
partial void Onoriginal_xmlChanging(string value);
partial void Onoriginal_xmlChanged();
partial void Onupdated_xmlChanging(string value);
partial void Onupdated_xmlChanged();
partial void Onorganization_idChanging(int value);
partial void Onorganization_idChanged();
partial void Ondate_createdChanging(System.DateTime value);
partial void Ondate_createdChanged();
partial void Oncreated_byChanging(string value);
partial void Oncreated_byChanged();
partial void Ondate_modifiedChanging(System.DateTime value);
partial void Ondate_modifiedChanged();
partial void Onmodified_byChanging(string value);
partial void Onmodified_byChanged();
partial void OnactiveChanging(bool value);
partial void OnactiveChanged();
#endregion
public HistoryData()
{
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_history_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
public int history_id
{
get
{
return this._history_id;
}
set
{
if ((this._history_id != value))
{
this.Onhistory_idChanging(value);
this.SendPropertyChanging();
this._history_id = value;
this.SendPropertyChanged("history_id");
this.Onhistory_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_object_type_name", DbType="VarChar(400) NOT NULL", CanBeNull=false)]
public string object_type_name
{
get
{
return this._object_type_name;
}
set
{
if ((this._object_type_name != value))
{
this.Onobject_type_nameChanging(value);
this.SendPropertyChanging();
this._object_type_name = value;
this.SendPropertyChanged("object_type_name");
this.Onobject_type_nameChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_identifier", DbType="Int NOT NULL")]
public int identifier
{
get
{
return this._identifier;
}
set
{
if ((this._identifier != value))
{
this.OnidentifierChanging(value);
this.SendPropertyChanging();
this._identifier = value;
this.SendPropertyChanged("identifier");
this.OnidentifierChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_history_type", DbType="Int NOT NULL")]
public int history_type
{
get
{
return this._history_type;
}
set
{
if ((this._history_type != value))
{
this.Onhistory_typeChanging(value);
this.SendPropertyChanging();
this._history_type = value;
this.SendPropertyChanged("history_type");
this.Onhistory_typeChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_original_xml", DbType="VarChar(MAX)")]
public string original_xml
{
get
{
return this._original_xml;
}
set
{
if ((this._original_xml != value))
{
this.Onoriginal_xmlChanging(value);
this.SendPropertyChanging();
this._original_xml = value;
this.SendPropertyChanged("original_xml");
this.Onoriginal_xmlChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_updated_xml", DbType="VarChar(MAX)")]
public string updated_xml
{
get
{
return this._updated_xml;
}
set
{
if ((this._updated_xml != value))
{
this.Onupdated_xmlChanging(value);
this.SendPropertyChanging();
this._updated_xml = value;
this.SendPropertyChanged("updated_xml");
this.Onupdated_xmlChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_organization_id", DbType="Int NOT NULL")]
public int organization_id
{
get
{
return this._organization_id;
}
set
{
if ((this._organization_id != value))
{
this.Onorganization_idChanging(value);
this.SendPropertyChanging();
this._organization_id = value;
this.SendPropertyChanged("organization_id");
this.Onorganization_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_created", DbType="DateTime NOT NULL")]
public System.DateTime date_created
{
get
{
return this._date_created;
}
set
{
if ((this._date_created != value))
{
this.Ondate_createdChanging(value);
this.SendPropertyChanging();
this._date_created = value;
this.SendPropertyChanged("date_created");
this.Ondate_createdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_created_by", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
public string created_by
{
get
{
return this._created_by;
}
set
{
if ((this._created_by != value))
{
this.Oncreated_byChanging(value);
this.SendPropertyChanging();
this._created_by = value;
this.SendPropertyChanged("created_by");
this.Oncreated_byChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_modified", DbType="DateTime NOT NULL")]
public System.DateTime date_modified
{
get
{
return this._date_modified;
}
set
{
if ((this._date_modified != value))
{
this.Ondate_modifiedChanging(value);
this.SendPropertyChanging();
this._date_modified = value;
this.SendPropertyChanged("date_modified");
this.Ondate_modifiedChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_modified_by", DbType="VarChar(50)")]
public string modified_by
{
get
{
return this._modified_by;
}
set
{
if ((this._modified_by != value))
{
this.Onmodified_byChanging(value);
this.SendPropertyChanging();
this._modified_by = value;
this.SendPropertyChanged("modified_by");
this.Onmodified_byChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_active", DbType="Bit NOT NULL")]
public bool active
{
get
{
return this._active;
}
set
{
if ((this._active != value))
{
this.OnactiveChanging(value);
this.SendPropertyChanging();
this._active = value;
this.SendPropertyChanged("active");
this.OnactiveChanged();
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo._org_secc_Purchasing_Campus")]
public partial class CampusData : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _campus_id;
private int _campus_company_id;
private int _campus_fund_id;
private System.DateTime _date_created;
private string _created_by;
private System.DateTime _date_modified;
private string _modified_by;
private bool _active;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void Oncampus_idChanging(int value);
partial void Oncampus_idChanged();
partial void Oncampus_company_idChanging(int value);
partial void Oncampus_company_idChanged();
partial void Oncampus_fund_idChanging(int value);
partial void Oncampus_fund_idChanged();
partial void Ondate_createdChanging(System.DateTime value);
partial void Ondate_createdChanged();
partial void Oncreated_byChanging(string value);
partial void Oncreated_byChanged();
partial void Ondate_modifiedChanging(System.DateTime value);
partial void Ondate_modifiedChanged();
partial void Onmodified_byChanging(string value);
partial void Onmodified_byChanged();
partial void OnactiveChanging(bool value);
partial void OnactiveChanged();
#endregion
public CampusData()
{
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_campus_id", DbType="Int NOT NULL", IsPrimaryKey=true)]
public int campus_id
{
get
{
return this._campus_id;
}
set
{
if ((this._campus_id != value))
{
this.Oncampus_idChanging(value);
this.SendPropertyChanging();
this._campus_id = value;
this.SendPropertyChanged("campus_id");
this.Oncampus_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_campus_company_id", DbType="Int NOT NULL")]
public int campus_company_id
{
get
{
return this._campus_company_id;
}
set
{
if ((this._campus_company_id != value))
{
this.Oncampus_company_idChanging(value);
this.SendPropertyChanging();
this._campus_company_id = value;
this.SendPropertyChanged("campus_company_id");
this.Oncampus_company_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_campus_fund_id", DbType="Int NOT NULL")]
public int campus_fund_id
{
get
{
return this._campus_fund_id;
}
set
{
if ((this._campus_fund_id != value))
{
this.Oncampus_fund_idChanging(value);
this.SendPropertyChanging();
this._campus_fund_id = value;
this.SendPropertyChanged("campus_fund_id");
this.Oncampus_fund_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_created", DbType="DateTime NOT NULL")]
public System.DateTime date_created
{
get
{
return this._date_created;
}
set
{
if ((this._date_created != value))
{
this.Ondate_createdChanging(value);
this.SendPropertyChanging();
this._date_created = value;
this.SendPropertyChanged("date_created");
this.Ondate_createdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_created_by", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
public string created_by
{
get
{
return this._created_by;
}
set
{
if ((this._created_by != value))
{
this.Oncreated_byChanging(value);
this.SendPropertyChanging();
this._created_by = value;
this.SendPropertyChanged("created_by");
this.Oncreated_byChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_modified", DbType="DateTime NOT NULL")]
public System.DateTime date_modified
{
get
{
return this._date_modified;
}
set
{
if ((this._date_modified != value))
{
this.Ondate_modifiedChanging(value);
this.SendPropertyChanging();
this._date_modified = value;
this.SendPropertyChanged("date_modified");
this.Ondate_modifiedChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_modified_by", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
public string modified_by
{
get
{
return this._modified_by;
}
set
{
if ((this._modified_by != value))
{
this.Onmodified_byChanging(value);
this.SendPropertyChanging();
this._modified_by = value;
this.SendPropertyChanged("modified_by");
this.Onmodified_byChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_active", DbType="Bit NOT NULL")]
public bool active
{
get
{
return this._active;
}
set
{
if ((this._active != value))
{
this.OnactiveChanging(value);
this.SendPropertyChanging();
this._active = value;
this.SendPropertyChanged("active");
this.OnactiveChanged();
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo._org_secc_Purchasing_PaymentMethod")]
public partial class PaymentMethodData : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _payment_method_id;
private string _name;
private string _description;
private System.Nullable<int> _credit_card_id;
private string _created_by;
private string _modified_by;
private System.DateTime _date_created;
private System.Nullable<System.DateTime> _date_modified;
private bool _active;
private int _organization_id;
private EntitySet<PaymentData> _PaymentDatas;
private EntitySet<PurchaseOrderData> _PurchaseOrderDatas;
private EntityRef<PaymentCreditCardData> _PaymentCreditCardData;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void Onpayment_method_idChanging(int value);
partial void Onpayment_method_idChanged();
partial void OnnameChanging(string value);
partial void OnnameChanged();
partial void OndescriptionChanging(string value);
partial void OndescriptionChanged();
partial void Oncredit_card_idChanging(System.Nullable<int> value);
partial void Oncredit_card_idChanged();
partial void Oncreated_byChanging(string value);
partial void Oncreated_byChanged();
partial void Onmodified_byChanging(string value);
partial void Onmodified_byChanged();
partial void Ondate_createdChanging(System.DateTime value);
partial void Ondate_createdChanged();
partial void Ondate_modifiedChanging(System.Nullable<System.DateTime> value);
partial void Ondate_modifiedChanged();
partial void OnactiveChanging(bool value);
partial void OnactiveChanged();
partial void Onorganization_idChanging(int value);
partial void Onorganization_idChanged();
#endregion
public PaymentMethodData()
{
this._PaymentDatas = new EntitySet<PaymentData>(new Action<PaymentData>(this.attach_PaymentDatas), new Action<PaymentData>(this.detach_PaymentDatas));
this._PurchaseOrderDatas = new EntitySet<PurchaseOrderData>(new Action<PurchaseOrderData>(this.attach_PurchaseOrderDatas), new Action<PurchaseOrderData>(this.detach_PurchaseOrderDatas));
this._PaymentCreditCardData = default(EntityRef<PaymentCreditCardData>);
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_payment_method_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
public int payment_method_id
{
get
{
return this._payment_method_id;
}
set
{
if ((this._payment_method_id != value))
{
this.Onpayment_method_idChanging(value);
this.SendPropertyChanging();
this._payment_method_id = value;
this.SendPropertyChanged("payment_method_id");
this.Onpayment_method_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_name", DbType="VarChar(100) NOT NULL", CanBeNull=false)]
public string name
{
get
{
return this._name;
}
set
{
if ((this._name != value))
{
this.OnnameChanging(value);
this.SendPropertyChanging();
this._name = value;
this.SendPropertyChanged("name");
this.OnnameChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_description", DbType="VarChar(500)")]
public string description
{
get
{
return this._description;
}
set
{
if ((this._description != value))
{
this.OndescriptionChanging(value);
this.SendPropertyChanging();
this._description = value;
this.SendPropertyChanged("description");
this.OndescriptionChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_credit_card_id", DbType="Int")]
public System.Nullable<int> credit_card_id
{
get
{
return this._credit_card_id;
}
set
{
if ((this._credit_card_id != value))
{
if (this._PaymentCreditCardData.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.Oncredit_card_idChanging(value);
this.SendPropertyChanging();
this._credit_card_id = value;
this.SendPropertyChanged("credit_card_id");
this.Oncredit_card_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_created_by", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
public string created_by
{
get
{
return this._created_by;
}
set
{
if ((this._created_by != value))
{
this.Oncreated_byChanging(value);
this.SendPropertyChanging();
this._created_by = value;
this.SendPropertyChanged("created_by");
this.Oncreated_byChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_modified_by", DbType="VarChar(50)")]
public string modified_by
{
get
{
return this._modified_by;
}
set
{
if ((this._modified_by != value))
{
this.Onmodified_byChanging(value);
this.SendPropertyChanging();
this._modified_by = value;
this.SendPropertyChanged("modified_by");
this.Onmodified_byChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_created", DbType="DateTime NOT NULL")]
public System.DateTime date_created
{
get
{
return this._date_created;
}
set
{
if ((this._date_created != value))
{
this.Ondate_createdChanging(value);
this.SendPropertyChanging();
this._date_created = value;
this.SendPropertyChanged("date_created");
this.Ondate_createdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_modified", DbType="DateTime")]
public System.Nullable<System.DateTime> date_modified
{
get
{
return this._date_modified;
}
set
{
if ((this._date_modified != value))
{
this.Ondate_modifiedChanging(value);
this.SendPropertyChanging();
this._date_modified = value;
this.SendPropertyChanged("date_modified");
this.Ondate_modifiedChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_active", DbType="Bit NOT NULL")]
public bool active
{
get
{
return this._active;
}
set
{
if ((this._active != value))
{
this.OnactiveChanging(value);
this.SendPropertyChanging();
this._active = value;
this.SendPropertyChanged("active");
this.OnactiveChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_organization_id", DbType="Int NOT NULL")]
public int organization_id
{
get
{
return this._organization_id;
}
set
{
if ((this._organization_id != value))
{
this.Onorganization_idChanging(value);
this.SendPropertyChanging();
this._organization_id = value;
this.SendPropertyChanged("organization_id");
this.Onorganization_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="PaymentMethodData_PaymentData", Storage="_PaymentDatas", ThisKey="payment_method_id", OtherKey="payment_method_id")]
public EntitySet<PaymentData> PaymentDatas
{
get
{
return this._PaymentDatas;
}
set
{
this._PaymentDatas.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="PaymentMethodData_PurchaseOrderData", Storage="_PurchaseOrderDatas", ThisKey="payment_method_id", OtherKey="default_payment_method_id")]
public EntitySet<PurchaseOrderData> PurchaseOrderDatas
{
get
{
return this._PurchaseOrderDatas;
}
set
{
this._PurchaseOrderDatas.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="PaymentCreditCardData_PaymentMethodData", Storage="_PaymentCreditCardData", ThisKey="credit_card_id", OtherKey="credit_card_id", IsForeignKey=true)]
public PaymentCreditCardData PaymentCreditCardData
{
get
{
return this._PaymentCreditCardData.Entity;
}
set
{
PaymentCreditCardData previousValue = this._PaymentCreditCardData.Entity;
if (((previousValue != value)
|| (this._PaymentCreditCardData.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._PaymentCreditCardData.Entity = null;
previousValue.PaymentMethodDatas.Remove(this);
}
this._PaymentCreditCardData.Entity = value;
if ((value != null))
{
value.PaymentMethodDatas.Add(this);
this._credit_card_id = value.credit_card_id;
}
else
{
this._credit_card_id = default(Nullable<int>);
}
this.SendPropertyChanged("PaymentCreditCardData");
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
private void attach_PaymentDatas(PaymentData entity)
{
this.SendPropertyChanging();
entity.PaymentMethodData = this;
}
private void detach_PaymentDatas(PaymentData entity)
{
this.SendPropertyChanging();
entity.PaymentMethodData = null;
}
private void attach_PurchaseOrderDatas(PurchaseOrderData entity)
{
this.SendPropertyChanging();
entity.PaymentMethodData = this;
}
private void detach_PurchaseOrderDatas(PurchaseOrderData entity)
{
this.SendPropertyChanging();
entity.PaymentMethodData = null;
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo._org_secc_Purchasing_CreditCard")]
public partial class PaymentCreditCardData : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _credit_card_id;
private string _card_last_four;
private System.DateTime _card_expiration_date;
private System.Nullable<int> _card_holder_id;
private string _created_by;
private string _modified_by;
private System.DateTime _date_created;
private System.Nullable<System.DateTime> _date_modified;
private bool _active;
private EntitySet<PaymentMethodData> _PaymentMethodDatas;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void Oncredit_card_idChanging(int value);
partial void Oncredit_card_idChanged();
partial void Oncard_last_fourChanging(string value);
partial void Oncard_last_fourChanged();
partial void Oncard_expiration_dateChanging(System.DateTime value);
partial void Oncard_expiration_dateChanged();
partial void Oncard_holder_idChanging(System.Nullable<int> value);
partial void Oncard_holder_idChanged();
partial void Oncreated_byChanging(string value);
partial void Oncreated_byChanged();
partial void Onmodified_byChanging(string value);
partial void Onmodified_byChanged();
partial void Ondate_createdChanging(System.DateTime value);
partial void Ondate_createdChanged();
partial void Ondate_modifiedChanging(System.Nullable<System.DateTime> value);
partial void Ondate_modifiedChanged();
partial void OnactiveChanging(bool value);
partial void OnactiveChanged();
#endregion
public PaymentCreditCardData()
{
this._PaymentMethodDatas = new EntitySet<PaymentMethodData>(new Action<PaymentMethodData>(this.attach_PaymentMethodDatas), new Action<PaymentMethodData>(this.detach_PaymentMethodDatas));
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_credit_card_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
public int credit_card_id
{
get
{
return this._credit_card_id;
}
set
{
if ((this._credit_card_id != value))
{
this.Oncredit_card_idChanging(value);
this.SendPropertyChanging();
this._credit_card_id = value;
this.SendPropertyChanged("credit_card_id");
this.Oncredit_card_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_card_last_four", DbType="Char(4) NOT NULL", CanBeNull=false)]
public string card_last_four
{
get
{
return this._card_last_four;
}
set
{
if ((this._card_last_four != value))
{
this.Oncard_last_fourChanging(value);
this.SendPropertyChanging();
this._card_last_four = value;
this.SendPropertyChanged("card_last_four");
this.Oncard_last_fourChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_card_expiration_date", DbType="DateTime NOT NULL")]
public System.DateTime card_expiration_date
{
get
{
return this._card_expiration_date;
}
set
{
if ((this._card_expiration_date != value))
{
this.Oncard_expiration_dateChanging(value);
this.SendPropertyChanging();
this._card_expiration_date = value;
this.SendPropertyChanged("card_expiration_date");
this.Oncard_expiration_dateChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_card_holder_id", DbType="Int")]
public System.Nullable<int> card_holder_id
{
get
{
return this._card_holder_id;
}
set
{
if ((this._card_holder_id != value))
{
this.Oncard_holder_idChanging(value);
this.SendPropertyChanging();
this._card_holder_id = value;
this.SendPropertyChanged("card_holder_id");
this.Oncard_holder_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_created_by", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
public string created_by
{
get
{
return this._created_by;
}
set
{
if ((this._created_by != value))
{
this.Oncreated_byChanging(value);
this.SendPropertyChanging();
this._created_by = value;
this.SendPropertyChanged("created_by");
this.Oncreated_byChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_modified_by", DbType="VarChar(50)")]
public string modified_by
{
get
{
return this._modified_by;
}
set
{
if ((this._modified_by != value))
{
this.Onmodified_byChanging(value);
this.SendPropertyChanging();
this._modified_by = value;
this.SendPropertyChanged("modified_by");
this.Onmodified_byChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_created", DbType="DateTime NOT NULL")]
public System.DateTime date_created
{
get
{
return this._date_created;
}
set
{
if ((this._date_created != value))
{
this.Ondate_createdChanging(value);
this.SendPropertyChanging();
this._date_created = value;
this.SendPropertyChanged("date_created");
this.Ondate_createdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_modified", DbType="DateTime")]
public System.Nullable<System.DateTime> date_modified
{
get
{
return this._date_modified;
}
set
{
if ((this._date_modified != value))
{
this.Ondate_modifiedChanging(value);
this.SendPropertyChanging();
this._date_modified = value;
this.SendPropertyChanged("date_modified");
this.Ondate_modifiedChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_active", DbType="Bit NOT NULL")]
public bool active
{
get
{
return this._active;
}
set
{
if ((this._active != value))
{
this.OnactiveChanging(value);
this.SendPropertyChanging();
this._active = value;
this.SendPropertyChanged("active");
this.OnactiveChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="PaymentCreditCardData_PaymentMethodData", Storage="_PaymentMethodDatas", ThisKey="credit_card_id", OtherKey="credit_card_id")]
public EntitySet<PaymentMethodData> PaymentMethodDatas
{
get
{
return this._PaymentMethodDatas;
}
set
{
this._PaymentMethodDatas.Assign(value);
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
private void attach_PaymentMethodDatas(PaymentMethodData entity)
{
this.SendPropertyChanging();
entity.PaymentCreditCardData = this;
}
private void detach_PaymentMethodDatas(PaymentMethodData entity)
{
this.SendPropertyChanging();
entity.PaymentCreditCardData = null;
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo._org_secc_Purchasing_RequisitionItem")]
public partial class RequisitionItemData : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _requisition_item_id;
private int _requisition_id;
private int _quantity;
private string _description;
private System.Nullable<System.DateTime> _date_needed;
private int _company_id;
private int _fund_id;
private int _department_id;
private int _account_id;
private string _created_by;
private string _modified_by;
private System.DateTime _date_created;
private System.Nullable<System.DateTime> _date_modified;
private bool _active;
private System.Nullable<decimal> _price;
private System.Nullable<System.DateTime> _fiscal_year_start;
private bool _is_expedited_shipping_allowed;
private string _item_number;
private EntitySet<PurchaseOrderItemData> _PurchaseOrderItemDatas;
private EntityRef<RequisitionData> _RequisitionData;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void Onrequisition_item_idChanging(int value);
partial void Onrequisition_item_idChanged();
partial void Onrequisition_idChanging(int value);
partial void Onrequisition_idChanged();
partial void OnquantityChanging(int value);
partial void OnquantityChanged();
partial void OndescriptionChanging(string value);
partial void OndescriptionChanged();
partial void Ondate_neededChanging(System.Nullable<System.DateTime> value);
partial void Ondate_neededChanged();
partial void Oncompany_idChanging(int value);
partial void Oncompany_idChanged();
partial void Onfund_idChanging(int value);
partial void Onfund_idChanged();
partial void Ondepartment_idChanging(int value);
partial void Ondepartment_idChanged();
partial void Onaccount_idChanging(int value);
partial void Onaccount_idChanged();
partial void Oncreated_byChanging(string value);
partial void Oncreated_byChanged();
partial void Onmodified_byChanging(string value);
partial void Onmodified_byChanged();
partial void Ondate_createdChanging(System.DateTime value);
partial void Ondate_createdChanged();
partial void Ondate_modifiedChanging(System.Nullable<System.DateTime> value);
partial void Ondate_modifiedChanged();
partial void OnactiveChanging(bool value);
partial void OnactiveChanged();
partial void OnpriceChanging(System.Nullable<decimal> value);
partial void OnpriceChanged();
partial void Onfiscal_year_startChanging(System.Nullable<System.DateTime> value);
partial void Onfiscal_year_startChanged();
partial void Onis_expedited_shipping_allowedChanging(bool value);
partial void Onis_expedited_shipping_allowedChanged();
partial void Onitem_numberChanging(string value);
partial void Onitem_numberChanged();
#endregion
public RequisitionItemData()
{
this._PurchaseOrderItemDatas = new EntitySet<PurchaseOrderItemData>(new Action<PurchaseOrderItemData>(this.attach_PurchaseOrderItemDatas), new Action<PurchaseOrderItemData>(this.detach_PurchaseOrderItemDatas));
this._RequisitionData = default(EntityRef<RequisitionData>);
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_requisition_item_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
public int requisition_item_id
{
get
{
return this._requisition_item_id;
}
set
{
if ((this._requisition_item_id != value))
{
this.Onrequisition_item_idChanging(value);
this.SendPropertyChanging();
this._requisition_item_id = value;
this.SendPropertyChanged("requisition_item_id");
this.Onrequisition_item_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_requisition_id", DbType="Int NOT NULL")]
public int requisition_id
{
get
{
return this._requisition_id;
}
set
{
if ((this._requisition_id != value))
{
if (this._RequisitionData.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.Onrequisition_idChanging(value);
this.SendPropertyChanging();
this._requisition_id = value;
this.SendPropertyChanged("requisition_id");
this.Onrequisition_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_quantity", DbType="Int NOT NULL")]
public int quantity
{
get
{
return this._quantity;
}
set
{
if ((this._quantity != value))
{
this.OnquantityChanging(value);
this.SendPropertyChanging();
this._quantity = value;
this.SendPropertyChanged("quantity");
this.OnquantityChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_description", DbType="VarChar(MAX) NOT NULL", CanBeNull=false)]
public string description
{
get
{
return this._description;
}
set
{
if ((this._description != value))
{
this.OndescriptionChanging(value);
this.SendPropertyChanging();
this._description = value;
this.SendPropertyChanged("description");
this.OndescriptionChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_needed", DbType="DateTime")]
public System.Nullable<System.DateTime> date_needed
{
get
{
return this._date_needed;
}
set
{
if ((this._date_needed != value))
{
this.Ondate_neededChanging(value);
this.SendPropertyChanging();
this._date_needed = value;
this.SendPropertyChanged("date_needed");
this.Ondate_neededChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_company_id", DbType="Int NOT NULL")]
public int company_id
{
get
{
return this._company_id;
}
set
{
if ((this._company_id != value))
{
this.Oncompany_idChanging(value);
this.SendPropertyChanging();
this._company_id = value;
this.SendPropertyChanged("company_id");
this.Oncompany_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_fund_id", DbType="Int NOT NULL")]
public int fund_id
{
get
{
return this._fund_id;
}
set
{
if ((this._fund_id != value))
{
this.Onfund_idChanging(value);
this.SendPropertyChanging();
this._fund_id = value;
this.SendPropertyChanged("fund_id");
this.Onfund_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_department_id", DbType="Int NOT NULL")]
public int department_id
{
get
{
return this._department_id;
}
set
{
if ((this._department_id != value))
{
this.Ondepartment_idChanging(value);
this.SendPropertyChanging();
this._department_id = value;
this.SendPropertyChanged("department_id");
this.Ondepartment_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_account_id", DbType="Int NOT NULL")]
public int account_id
{
get
{
return this._account_id;
}
set
{
if ((this._account_id != value))
{
this.Onaccount_idChanging(value);
this.SendPropertyChanging();
this._account_id = value;
this.SendPropertyChanged("account_id");
this.Onaccount_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_created_by", DbType="VarChar(25) NOT NULL", CanBeNull=false)]
public string created_by
{
get
{
return this._created_by;
}
set
{
if ((this._created_by != value))
{
this.Oncreated_byChanging(value);
this.SendPropertyChanging();
this._created_by = value;
this.SendPropertyChanged("created_by");
this.Oncreated_byChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_modified_by", DbType="VarChar(25)")]
public string modified_by
{
get
{
return this._modified_by;
}
set
{
if ((this._modified_by != value))
{
this.Onmodified_byChanging(value);
this.SendPropertyChanging();
this._modified_by = value;
this.SendPropertyChanged("modified_by");
this.Onmodified_byChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_created", DbType="DateTime NOT NULL")]
public System.DateTime date_created
{
get
{
return this._date_created;
}
set
{
if ((this._date_created != value))
{
this.Ondate_createdChanging(value);
this.SendPropertyChanging();
this._date_created = value;
this.SendPropertyChanged("date_created");
this.Ondate_createdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_modified", DbType="DateTime")]
public System.Nullable<System.DateTime> date_modified
{
get
{
return this._date_modified;
}
set
{
if ((this._date_modified != value))
{
this.Ondate_modifiedChanging(value);
this.SendPropertyChanging();
this._date_modified = value;
this.SendPropertyChanged("date_modified");
this.Ondate_modifiedChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_active", DbType="Bit NOT NULL")]
public bool active
{
get
{
return this._active;
}
set
{
if ((this._active != value))
{
this.OnactiveChanging(value);
this.SendPropertyChanging();
this._active = value;
this.SendPropertyChanged("active");
this.OnactiveChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_price", DbType="Decimal(10,2)")]
public System.Nullable<decimal> price
{
get
{
return this._price;
}
set
{
if ((this._price != value))
{
this.OnpriceChanging(value);
this.SendPropertyChanging();
this._price = value;
this.SendPropertyChanged("price");
this.OnpriceChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_fiscal_year_start", DbType="DateTime")]
public System.Nullable<System.DateTime> fiscal_year_start
{
get
{
return this._fiscal_year_start;
}
set
{
if ((this._fiscal_year_start != value))
{
this.Onfiscal_year_startChanging(value);
this.SendPropertyChanging();
this._fiscal_year_start = value;
this.SendPropertyChanged("fiscal_year_start");
this.Onfiscal_year_startChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_is_expedited_shipping_allowed", DbType="Bit NOT NULL")]
public bool is_expedited_shipping_allowed
{
get
{
return this._is_expedited_shipping_allowed;
}
set
{
if ((this._is_expedited_shipping_allowed != value))
{
this.Onis_expedited_shipping_allowedChanging(value);
this.SendPropertyChanging();
this._is_expedited_shipping_allowed = value;
this.SendPropertyChanged("is_expedited_shipping_allowed");
this.Onis_expedited_shipping_allowedChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_item_number", DbType="VarChar(50)")]
public string item_number
{
get
{
return this._item_number;
}
set
{
if ((this._item_number != value))
{
this.Onitem_numberChanging(value);
this.SendPropertyChanging();
this._item_number = value;
this.SendPropertyChanged("item_number");
this.Onitem_numberChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="RequisitionItemData_PurchaseOrderItemData", Storage="_PurchaseOrderItemDatas", ThisKey="requisition_item_id", OtherKey="requisition_item_id")]
public EntitySet<PurchaseOrderItemData> PurchaseOrderItemDatas
{
get
{
return this._PurchaseOrderItemDatas;
}
set
{
this._PurchaseOrderItemDatas.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="RequisitionData_RequisitionItemData", Storage="_RequisitionData", ThisKey="requisition_id", OtherKey="requisition_id", IsForeignKey=true)]
public RequisitionData RequisitionData
{
get
{
return this._RequisitionData.Entity;
}
set
{
RequisitionData previousValue = this._RequisitionData.Entity;
if (((previousValue != value)
|| (this._RequisitionData.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._RequisitionData.Entity = null;
previousValue.RequisitionItemDatas.Remove(this);
}
this._RequisitionData.Entity = value;
if ((value != null))
{
value.RequisitionItemDatas.Add(this);
this._requisition_id = value.requisition_id;
}
else
{
this._requisition_id = default(int);
}
this.SendPropertyChanged("RequisitionData");
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
private void attach_PurchaseOrderItemDatas(PurchaseOrderItemData entity)
{
this.SendPropertyChanging();
entity.RequisitionItemData = this;
}
private void detach_PurchaseOrderItemDatas(PurchaseOrderItemData entity)
{
this.SendPropertyChanging();
entity.RequisitionItemData = null;
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo._org_secc_Purchasing_PurchaseOrderItem")]
public partial class PurchaseOrderItemData : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _purchase_order_item_id;
private int _purchase_order_id;
private int _requisition_item_id;
private int _quantity;
private bool _has_been_received;
private string _created_by;
private string _modified_by;
private System.DateTime _date_created;
private System.DateTime _date_modified;
private bool _active;
private System.Nullable<decimal> _price;
private EntitySet<ReceiptItemData> _ReceiptItemDatas;
private EntityRef<RequisitionItemData> _RequisitionItemData;
private EntityRef<PurchaseOrderData> _PurchaseOrderData;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void Onpurchase_order_item_idChanging(int value);
partial void Onpurchase_order_item_idChanged();
partial void Onpurchase_order_idChanging(int value);
partial void Onpurchase_order_idChanged();
partial void Onrequisition_item_idChanging(int value);
partial void Onrequisition_item_idChanged();
partial void OnquantityChanging(int value);
partial void OnquantityChanged();
partial void Onhas_been_receivedChanging(bool value);
partial void Onhas_been_receivedChanged();
partial void Oncreated_byChanging(string value);
partial void Oncreated_byChanged();
partial void Onmodified_byChanging(string value);
partial void Onmodified_byChanged();
partial void Ondate_createdChanging(System.DateTime value);
partial void Ondate_createdChanged();
partial void Ondate_modifiedChanging(System.DateTime value);
partial void Ondate_modifiedChanged();
partial void OnactiveChanging(bool value);
partial void OnactiveChanged();
partial void OnpriceChanging(System.Nullable<decimal> value);
partial void OnpriceChanged();
#endregion
public PurchaseOrderItemData()
{
this._ReceiptItemDatas = new EntitySet<ReceiptItemData>(new Action<ReceiptItemData>(this.attach_ReceiptItemDatas), new Action<ReceiptItemData>(this.detach_ReceiptItemDatas));
this._RequisitionItemData = default(EntityRef<RequisitionItemData>);
this._PurchaseOrderData = default(EntityRef<PurchaseOrderData>);
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_purchase_order_item_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
public int purchase_order_item_id
{
get
{
return this._purchase_order_item_id;
}
set
{
if ((this._purchase_order_item_id != value))
{
this.Onpurchase_order_item_idChanging(value);
this.SendPropertyChanging();
this._purchase_order_item_id = value;
this.SendPropertyChanged("purchase_order_item_id");
this.Onpurchase_order_item_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_purchase_order_id", DbType="Int NOT NULL")]
public int purchase_order_id
{
get
{
return this._purchase_order_id;
}
set
{
if ((this._purchase_order_id != value))
{
if (this._PurchaseOrderData.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.Onpurchase_order_idChanging(value);
this.SendPropertyChanging();
this._purchase_order_id = value;
this.SendPropertyChanged("purchase_order_id");
this.Onpurchase_order_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_requisition_item_id", DbType="Int NOT NULL")]
public int requisition_item_id
{
get
{
return this._requisition_item_id;
}
set
{
if ((this._requisition_item_id != value))
{
if (this._RequisitionItemData.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.Onrequisition_item_idChanging(value);
this.SendPropertyChanging();
this._requisition_item_id = value;
this.SendPropertyChanged("requisition_item_id");
this.Onrequisition_item_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_quantity", DbType="Int NOT NULL")]
public int quantity
{
get
{
return this._quantity;
}
set
{
if ((this._quantity != value))
{
this.OnquantityChanging(value);
this.SendPropertyChanging();
this._quantity = value;
this.SendPropertyChanged("quantity");
this.OnquantityChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_has_been_received", DbType="Bit NOT NULL")]
public bool has_been_received
{
get
{
return this._has_been_received;
}
set
{
if ((this._has_been_received != value))
{
this.Onhas_been_receivedChanging(value);
this.SendPropertyChanging();
this._has_been_received = value;
this.SendPropertyChanged("has_been_received");
this.Onhas_been_receivedChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_created_by", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
public string created_by
{
get
{
return this._created_by;
}
set
{
if ((this._created_by != value))
{
this.Oncreated_byChanging(value);
this.SendPropertyChanging();
this._created_by = value;
this.SendPropertyChanged("created_by");
this.Oncreated_byChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_modified_by", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
public string modified_by
{
get
{
return this._modified_by;
}
set
{
if ((this._modified_by != value))
{
this.Onmodified_byChanging(value);
this.SendPropertyChanging();
this._modified_by = value;
this.SendPropertyChanged("modified_by");
this.Onmodified_byChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_created", DbType="DateTime NOT NULL")]
public System.DateTime date_created
{
get
{
return this._date_created;
}
set
{
if ((this._date_created != value))
{
this.Ondate_createdChanging(value);
this.SendPropertyChanging();
this._date_created = value;
this.SendPropertyChanged("date_created");
this.Ondate_createdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_modified", DbType="DateTime NOT NULL")]
public System.DateTime date_modified
{
get
{
return this._date_modified;
}
set
{
if ((this._date_modified != value))
{
this.Ondate_modifiedChanging(value);
this.SendPropertyChanging();
this._date_modified = value;
this.SendPropertyChanged("date_modified");
this.Ondate_modifiedChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_active", DbType="Bit NOT NULL")]
public bool active
{
get
{
return this._active;
}
set
{
if ((this._active != value))
{
this.OnactiveChanging(value);
this.SendPropertyChanging();
this._active = value;
this.SendPropertyChanged("active");
this.OnactiveChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_price", DbType="Decimal(10,2)")]
public System.Nullable<decimal> price
{
get
{
return this._price;
}
set
{
if ((this._price != value))
{
this.OnpriceChanging(value);
this.SendPropertyChanging();
this._price = value;
this.SendPropertyChanged("price");
this.OnpriceChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="PurchaseOrderItemData_ReceiptItemData", Storage="_ReceiptItemDatas", ThisKey="purchase_order_item_id", OtherKey="purchase_order_item_id")]
public EntitySet<ReceiptItemData> ReceiptItemDatas
{
get
{
return this._ReceiptItemDatas;
}
set
{
this._ReceiptItemDatas.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="RequisitionItemData_PurchaseOrderItemData", Storage="_RequisitionItemData", ThisKey="requisition_item_id", OtherKey="requisition_item_id", IsForeignKey=true)]
public RequisitionItemData RequisitionItemData
{
get
{
return this._RequisitionItemData.Entity;
}
set
{
RequisitionItemData previousValue = this._RequisitionItemData.Entity;
if (((previousValue != value)
|| (this._RequisitionItemData.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._RequisitionItemData.Entity = null;
previousValue.PurchaseOrderItemDatas.Remove(this);
}
this._RequisitionItemData.Entity = value;
if ((value != null))
{
value.PurchaseOrderItemDatas.Add(this);
this._requisition_item_id = value.requisition_item_id;
}
else
{
this._requisition_item_id = default(int);
}
this.SendPropertyChanged("RequisitionItemData");
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="PurchaseOrderData_PurchaseOrderItemData", Storage="_PurchaseOrderData", ThisKey="purchase_order_id", OtherKey="purchase_order_id", IsForeignKey=true)]
public PurchaseOrderData PurchaseOrderData
{
get
{
return this._PurchaseOrderData.Entity;
}
set
{
PurchaseOrderData previousValue = this._PurchaseOrderData.Entity;
if (((previousValue != value)
|| (this._PurchaseOrderData.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._PurchaseOrderData.Entity = null;
previousValue.PurchaseOrderItemDatas.Remove(this);
}
this._PurchaseOrderData.Entity = value;
if ((value != null))
{
value.PurchaseOrderItemDatas.Add(this);
this._purchase_order_id = value.purchase_order_id;
}
else
{
this._purchase_order_id = default(int);
}
this.SendPropertyChanged("PurchaseOrderData");
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
private void attach_ReceiptItemDatas(ReceiptItemData entity)
{
this.SendPropertyChanging();
entity.PurchaseOrderItemData = this;
}
private void detach_ReceiptItemDatas(ReceiptItemData entity)
{
this.SendPropertyChanging();
entity.PurchaseOrderItemData = null;
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo._org_secc_Purchasing_Receipt")]
public partial class ReceiptData : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _receipt_id;
private int _carrier_luid;
private int _purchase_order_id;
private int _received_by_id;
private System.DateTime _date_received;
private string _created_by;
private string _modified_by;
private System.DateTime _date_created;
private System.DateTime _date_modified;
private bool _active;
private EntitySet<ReceiptItemData> _ReceiptItemDatas;
private EntityRef<PurchaseOrderData> _PurchaseOrderData;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void Onreceipt_idChanging(int value);
partial void Onreceipt_idChanged();
partial void Oncarrier_luidChanging(int value);
partial void Oncarrier_luidChanged();
partial void Onpurchase_order_idChanging(int value);
partial void Onpurchase_order_idChanged();
partial void Onreceived_by_idChanging(int value);
partial void Onreceived_by_idChanged();
partial void Ondate_receivedChanging(System.DateTime value);
partial void Ondate_receivedChanged();
partial void Oncreated_byChanging(string value);
partial void Oncreated_byChanged();
partial void Onmodified_byChanging(string value);
partial void Onmodified_byChanged();
partial void Ondate_createdChanging(System.DateTime value);
partial void Ondate_createdChanged();
partial void Ondate_modifiedChanging(System.DateTime value);
partial void Ondate_modifiedChanged();
partial void OnactiveChanging(bool value);
partial void OnactiveChanged();
#endregion
public ReceiptData()
{
this._ReceiptItemDatas = new EntitySet<ReceiptItemData>(new Action<ReceiptItemData>(this.attach_ReceiptItemDatas), new Action<ReceiptItemData>(this.detach_ReceiptItemDatas));
this._PurchaseOrderData = default(EntityRef<PurchaseOrderData>);
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_receipt_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
public int receipt_id
{
get
{
return this._receipt_id;
}
set
{
if ((this._receipt_id != value))
{
this.Onreceipt_idChanging(value);
this.SendPropertyChanging();
this._receipt_id = value;
this.SendPropertyChanged("receipt_id");
this.Onreceipt_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_carrier_luid", DbType="Int NOT NULL")]
public int carrier_luid
{
get
{
return this._carrier_luid;
}
set
{
if ((this._carrier_luid != value))
{
this.Oncarrier_luidChanging(value);
this.SendPropertyChanging();
this._carrier_luid = value;
this.SendPropertyChanged("carrier_luid");
this.Oncarrier_luidChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_purchase_order_id", DbType="Int NOT NULL")]
public int purchase_order_id
{
get
{
return this._purchase_order_id;
}
set
{
if ((this._purchase_order_id != value))
{
if (this._PurchaseOrderData.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.Onpurchase_order_idChanging(value);
this.SendPropertyChanging();
this._purchase_order_id = value;
this.SendPropertyChanged("purchase_order_id");
this.Onpurchase_order_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_received_by_id", DbType="Int NOT NULL")]
public int received_by_id
{
get
{
return this._received_by_id;
}
set
{
if ((this._received_by_id != value))
{
this.Onreceived_by_idChanging(value);
this.SendPropertyChanging();
this._received_by_id = value;
this.SendPropertyChanged("received_by_id");
this.Onreceived_by_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_received", DbType="DateTime NOT NULL")]
public System.DateTime date_received
{
get
{
return this._date_received;
}
set
{
if ((this._date_received != value))
{
this.Ondate_receivedChanging(value);
this.SendPropertyChanging();
this._date_received = value;
this.SendPropertyChanged("date_received");
this.Ondate_receivedChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_created_by", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
public string created_by
{
get
{
return this._created_by;
}
set
{
if ((this._created_by != value))
{
this.Oncreated_byChanging(value);
this.SendPropertyChanging();
this._created_by = value;
this.SendPropertyChanged("created_by");
this.Oncreated_byChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_modified_by", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
public string modified_by
{
get
{
return this._modified_by;
}
set
{
if ((this._modified_by != value))
{
this.Onmodified_byChanging(value);
this.SendPropertyChanging();
this._modified_by = value;
this.SendPropertyChanged("modified_by");
this.Onmodified_byChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_created", DbType="DateTime NOT NULL")]
public System.DateTime date_created
{
get
{
return this._date_created;
}
set
{
if ((this._date_created != value))
{
this.Ondate_createdChanging(value);
this.SendPropertyChanging();
this._date_created = value;
this.SendPropertyChanged("date_created");
this.Ondate_createdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_modified", DbType="DateTime NOT NULL")]
public System.DateTime date_modified
{
get
{
return this._date_modified;
}
set
{
if ((this._date_modified != value))
{
this.Ondate_modifiedChanging(value);
this.SendPropertyChanging();
this._date_modified = value;
this.SendPropertyChanged("date_modified");
this.Ondate_modifiedChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_active", DbType="Bit NOT NULL")]
public bool active
{
get
{
return this._active;
}
set
{
if ((this._active != value))
{
this.OnactiveChanging(value);
this.SendPropertyChanging();
this._active = value;
this.SendPropertyChanged("active");
this.OnactiveChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="ReceiptData_ReceiptItemData", Storage="_ReceiptItemDatas", ThisKey="receipt_id", OtherKey="receipt_id")]
public EntitySet<ReceiptItemData> ReceiptItemDatas
{
get
{
return this._ReceiptItemDatas;
}
set
{
this._ReceiptItemDatas.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="PurchaseOrderData_ReceiptData", Storage="_PurchaseOrderData", ThisKey="purchase_order_id", OtherKey="purchase_order_id", IsForeignKey=true)]
public PurchaseOrderData PurchaseOrderData
{
get
{
return this._PurchaseOrderData.Entity;
}
set
{
PurchaseOrderData previousValue = this._PurchaseOrderData.Entity;
if (((previousValue != value)
|| (this._PurchaseOrderData.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._PurchaseOrderData.Entity = null;
previousValue.ReceiptDatas.Remove(this);
}
this._PurchaseOrderData.Entity = value;
if ((value != null))
{
value.ReceiptDatas.Add(this);
this._purchase_order_id = value.purchase_order_id;
}
else
{
this._purchase_order_id = default(int);
}
this.SendPropertyChanged("PurchaseOrderData");
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
private void attach_ReceiptItemDatas(ReceiptItemData entity)
{
this.SendPropertyChanging();
entity.ReceiptData = this;
}
private void detach_ReceiptItemDatas(ReceiptItemData entity)
{
this.SendPropertyChanging();
entity.ReceiptData = null;
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo._org_secc_Purchasing_ReceiptItem")]
public partial class ReceiptItemData : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _receipt_item_id;
private int _receipt_id;
private int _purchase_order_item_id;
private int _quantity_received;
private string _created_by;
private string _modified_by;
private System.DateTime _date_created;
private System.DateTime _date_modified;
private bool _active;
private EntityRef<PurchaseOrderItemData> _PurchaseOrderItemData;
private EntityRef<ReceiptData> _ReceiptData;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void Onreceipt_item_idChanging(int value);
partial void Onreceipt_item_idChanged();
partial void Onreceipt_idChanging(int value);
partial void Onreceipt_idChanged();
partial void Onpurchase_order_item_idChanging(int value);
partial void Onpurchase_order_item_idChanged();
partial void Onquantity_receivedChanging(int value);
partial void Onquantity_receivedChanged();
partial void Oncreated_byChanging(string value);
partial void Oncreated_byChanged();
partial void Onmodified_byChanging(string value);
partial void Onmodified_byChanged();
partial void Ondate_createdChanging(System.DateTime value);
partial void Ondate_createdChanged();
partial void Ondate_modifiedChanging(System.DateTime value);
partial void Ondate_modifiedChanged();
partial void OnactiveChanging(bool value);
partial void OnactiveChanged();
#endregion
public ReceiptItemData()
{
this._PurchaseOrderItemData = default(EntityRef<PurchaseOrderItemData>);
this._ReceiptData = default(EntityRef<ReceiptData>);
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_receipt_item_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
public int receipt_item_id
{
get
{
return this._receipt_item_id;
}
set
{
if ((this._receipt_item_id != value))
{
this.Onreceipt_item_idChanging(value);
this.SendPropertyChanging();
this._receipt_item_id = value;
this.SendPropertyChanged("receipt_item_id");
this.Onreceipt_item_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_receipt_id", DbType="Int NOT NULL")]
public int receipt_id
{
get
{
return this._receipt_id;
}
set
{
if ((this._receipt_id != value))
{
if (this._ReceiptData.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.Onreceipt_idChanging(value);
this.SendPropertyChanging();
this._receipt_id = value;
this.SendPropertyChanged("receipt_id");
this.Onreceipt_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_purchase_order_item_id", DbType="Int NOT NULL")]
public int purchase_order_item_id
{
get
{
return this._purchase_order_item_id;
}
set
{
if ((this._purchase_order_item_id != value))
{
if (this._PurchaseOrderItemData.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.Onpurchase_order_item_idChanging(value);
this.SendPropertyChanging();
this._purchase_order_item_id = value;
this.SendPropertyChanged("purchase_order_item_id");
this.Onpurchase_order_item_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_quantity_received", DbType="Int NOT NULL")]
public int quantity_received
{
get
{
return this._quantity_received;
}
set
{
if ((this._quantity_received != value))
{
this.Onquantity_receivedChanging(value);
this.SendPropertyChanging();
this._quantity_received = value;
this.SendPropertyChanged("quantity_received");
this.Onquantity_receivedChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_created_by", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
public string created_by
{
get
{
return this._created_by;
}
set
{
if ((this._created_by != value))
{
this.Oncreated_byChanging(value);
this.SendPropertyChanging();
this._created_by = value;
this.SendPropertyChanged("created_by");
this.Oncreated_byChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_modified_by", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
public string modified_by
{
get
{
return this._modified_by;
}
set
{
if ((this._modified_by != value))
{
this.Onmodified_byChanging(value);
this.SendPropertyChanging();
this._modified_by = value;
this.SendPropertyChanged("modified_by");
this.Onmodified_byChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_created", DbType="DateTime NOT NULL")]
public System.DateTime date_created
{
get
{
return this._date_created;
}
set
{
if ((this._date_created != value))
{
this.Ondate_createdChanging(value);
this.SendPropertyChanging();
this._date_created = value;
this.SendPropertyChanged("date_created");
this.Ondate_createdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_modified", DbType="DateTime NOT NULL")]
public System.DateTime date_modified
{
get
{
return this._date_modified;
}
set
{
if ((this._date_modified != value))
{
this.Ondate_modifiedChanging(value);
this.SendPropertyChanging();
this._date_modified = value;
this.SendPropertyChanged("date_modified");
this.Ondate_modifiedChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_active", DbType="Bit NOT NULL")]
public bool active
{
get
{
return this._active;
}
set
{
if ((this._active != value))
{
this.OnactiveChanging(value);
this.SendPropertyChanging();
this._active = value;
this.SendPropertyChanged("active");
this.OnactiveChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="PurchaseOrderItemData_ReceiptItemData", Storage="_PurchaseOrderItemData", ThisKey="purchase_order_item_id", OtherKey="purchase_order_item_id", IsForeignKey=true)]
public PurchaseOrderItemData PurchaseOrderItemData
{
get
{
return this._PurchaseOrderItemData.Entity;
}
set
{
PurchaseOrderItemData previousValue = this._PurchaseOrderItemData.Entity;
if (((previousValue != value)
|| (this._PurchaseOrderItemData.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._PurchaseOrderItemData.Entity = null;
previousValue.ReceiptItemDatas.Remove(this);
}
this._PurchaseOrderItemData.Entity = value;
if ((value != null))
{
value.ReceiptItemDatas.Add(this);
this._purchase_order_item_id = value.purchase_order_item_id;
}
else
{
this._purchase_order_item_id = default(int);
}
this.SendPropertyChanged("PurchaseOrderItemData");
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="ReceiptData_ReceiptItemData", Storage="_ReceiptData", ThisKey="receipt_id", OtherKey="receipt_id", IsForeignKey=true)]
public ReceiptData ReceiptData
{
get
{
return this._ReceiptData.Entity;
}
set
{
ReceiptData previousValue = this._ReceiptData.Entity;
if (((previousValue != value)
|| (this._ReceiptData.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._ReceiptData.Entity = null;
previousValue.ReceiptItemDatas.Remove(this);
}
this._ReceiptData.Entity = value;
if ((value != null))
{
value.ReceiptItemDatas.Add(this);
this._receipt_id = value.receipt_id;
}
else
{
this._receipt_id = default(int);
}
this.SendPropertyChanged("ReceiptData");
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo._org_secc_Purchasing_Payment")]
public partial class PaymentData : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _payment_id;
private int _payment_method_id;
private int _purchase_order_id;
private System.DateTime _payment_date;
private decimal _payment_amount;
private string _created_by;
private string _modified_by;
private System.DateTime _date_created;
private System.DateTime _date_modified;
private bool _active;
private string _note;
private EntitySet<PaymentChargeData> _PaymentChargeDatas;
private EntityRef<PaymentMethodData> _PaymentMethodData;
private EntityRef<PurchaseOrderData> _PurchaseOrderData;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void Onpayment_idChanging(int value);
partial void Onpayment_idChanged();
partial void Onpayment_method_idChanging(int value);
partial void Onpayment_method_idChanged();
partial void Onpurchase_order_idChanging(int value);
partial void Onpurchase_order_idChanged();
partial void Onpayment_dateChanging(System.DateTime value);
partial void Onpayment_dateChanged();
partial void Onpayment_amountChanging(decimal value);
partial void Onpayment_amountChanged();
partial void Oncreated_byChanging(string value);
partial void Oncreated_byChanged();
partial void Onmodified_byChanging(string value);
partial void Onmodified_byChanged();
partial void Ondate_createdChanging(System.DateTime value);
partial void Ondate_createdChanged();
partial void Ondate_modifiedChanging(System.DateTime value);
partial void Ondate_modifiedChanged();
partial void OnactiveChanging(bool value);
partial void OnactiveChanged();
partial void OnnoteChanging(string value);
partial void OnnoteChanged();
#endregion
public PaymentData()
{
this._PaymentChargeDatas = new EntitySet<PaymentChargeData>(new Action<PaymentChargeData>(this.attach_PaymentChargeDatas), new Action<PaymentChargeData>(this.detach_PaymentChargeDatas));
this._PaymentMethodData = default(EntityRef<PaymentMethodData>);
this._PurchaseOrderData = default(EntityRef<PurchaseOrderData>);
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_payment_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
public int payment_id
{
get
{
return this._payment_id;
}
set
{
if ((this._payment_id != value))
{
this.Onpayment_idChanging(value);
this.SendPropertyChanging();
this._payment_id = value;
this.SendPropertyChanged("payment_id");
this.Onpayment_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_payment_method_id", DbType="Int NOT NULL")]
public int payment_method_id
{
get
{
return this._payment_method_id;
}
set
{
if ((this._payment_method_id != value))
{
if (this._PaymentMethodData.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.Onpayment_method_idChanging(value);
this.SendPropertyChanging();
this._payment_method_id = value;
this.SendPropertyChanged("payment_method_id");
this.Onpayment_method_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_purchase_order_id", DbType="Int NOT NULL")]
public int purchase_order_id
{
get
{
return this._purchase_order_id;
}
set
{
if ((this._purchase_order_id != value))
{
if (this._PurchaseOrderData.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.Onpurchase_order_idChanging(value);
this.SendPropertyChanging();
this._purchase_order_id = value;
this.SendPropertyChanged("purchase_order_id");
this.Onpurchase_order_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_payment_date", DbType="DateTime NOT NULL")]
public System.DateTime payment_date
{
get
{
return this._payment_date;
}
set
{
if ((this._payment_date != value))
{
this.Onpayment_dateChanging(value);
this.SendPropertyChanging();
this._payment_date = value;
this.SendPropertyChanged("payment_date");
this.Onpayment_dateChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_payment_amount", DbType="Decimal(10,2) NOT NULL")]
public decimal payment_amount
{
get
{
return this._payment_amount;
}
set
{
if ((this._payment_amount != value))
{
this.Onpayment_amountChanging(value);
this.SendPropertyChanging();
this._payment_amount = value;
this.SendPropertyChanged("payment_amount");
this.Onpayment_amountChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_created_by", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
public string created_by
{
get
{
return this._created_by;
}
set
{
if ((this._created_by != value))
{
this.Oncreated_byChanging(value);
this.SendPropertyChanging();
this._created_by = value;
this.SendPropertyChanged("created_by");
this.Oncreated_byChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_modified_by", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
public string modified_by
{
get
{
return this._modified_by;
}
set
{
if ((this._modified_by != value))
{
this.Onmodified_byChanging(value);
this.SendPropertyChanging();
this._modified_by = value;
this.SendPropertyChanged("modified_by");
this.Onmodified_byChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_created", DbType="DateTime NOT NULL")]
public System.DateTime date_created
{
get
{
return this._date_created;
}
set
{
if ((this._date_created != value))
{
this.Ondate_createdChanging(value);
this.SendPropertyChanging();
this._date_created = value;
this.SendPropertyChanged("date_created");
this.Ondate_createdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_modified", DbType="DateTime NOT NULL")]
public System.DateTime date_modified
{
get
{
return this._date_modified;
}
set
{
if ((this._date_modified != value))
{
this.Ondate_modifiedChanging(value);
this.SendPropertyChanging();
this._date_modified = value;
this.SendPropertyChanged("date_modified");
this.Ondate_modifiedChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_active", DbType="Bit NOT NULL")]
public bool active
{
get
{
return this._active;
}
set
{
if ((this._active != value))
{
this.OnactiveChanging(value);
this.SendPropertyChanging();
this._active = value;
this.SendPropertyChanged("active");
this.OnactiveChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_note", DbType="VarChar(MAX)")]
public string note
{
get
{
return this._note;
}
set
{
if ((this._note != value))
{
this.OnnoteChanging(value);
this.SendPropertyChanging();
this._note = value;
this.SendPropertyChanged("note");
this.OnnoteChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="PaymentData_PaymentChargeData", Storage="_PaymentChargeDatas", ThisKey="payment_id", OtherKey="payment_id")]
public EntitySet<PaymentChargeData> PaymentChargeDatas
{
get
{
return this._PaymentChargeDatas;
}
set
{
this._PaymentChargeDatas.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="PaymentMethodData_PaymentData", Storage="_PaymentMethodData", ThisKey="payment_method_id", OtherKey="payment_method_id", IsForeignKey=true)]
public PaymentMethodData PaymentMethodData
{
get
{
return this._PaymentMethodData.Entity;
}
set
{
PaymentMethodData previousValue = this._PaymentMethodData.Entity;
if (((previousValue != value)
|| (this._PaymentMethodData.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._PaymentMethodData.Entity = null;
previousValue.PaymentDatas.Remove(this);
}
this._PaymentMethodData.Entity = value;
if ((value != null))
{
value.PaymentDatas.Add(this);
this._payment_method_id = value.payment_method_id;
}
else
{
this._payment_method_id = default(int);
}
this.SendPropertyChanged("PaymentMethodData");
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="PurchaseOrderData_PaymentData", Storage="_PurchaseOrderData", ThisKey="purchase_order_id", OtherKey="purchase_order_id", IsForeignKey=true)]
public PurchaseOrderData PurchaseOrderData
{
get
{
return this._PurchaseOrderData.Entity;
}
set
{
PurchaseOrderData previousValue = this._PurchaseOrderData.Entity;
if (((previousValue != value)
|| (this._PurchaseOrderData.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._PurchaseOrderData.Entity = null;
previousValue.PaymentDatas.Remove(this);
}
this._PurchaseOrderData.Entity = value;
if ((value != null))
{
value.PaymentDatas.Add(this);
this._purchase_order_id = value.purchase_order_id;
}
else
{
this._purchase_order_id = default(int);
}
this.SendPropertyChanged("PurchaseOrderData");
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
private void attach_PaymentChargeDatas(PaymentChargeData entity)
{
this.SendPropertyChanging();
entity.PaymentData = this;
}
private void detach_PaymentChargeDatas(PaymentChargeData entity)
{
this.SendPropertyChanging();
entity.PaymentData = null;
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo._org_secc_Purchasing_PaymentCharge")]
public partial class PaymentChargeData : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _charge_id;
private int _payment_id;
private int _requisition_id;
private int _company_id;
private int _fund_id;
private int _department_id;
private int _account_id;
private decimal _amount;
private string _created_by;
private string _modified_by;
private System.DateTime _date_created;
private System.DateTime _date_modified;
private bool _active;
private System.DateTime _fiscal_year_start;
private EntityRef<PaymentData> _PaymentData;
private EntityRef<RequisitionData> _RequisitionData;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void Oncharge_idChanging(int value);
partial void Oncharge_idChanged();
partial void Onpayment_idChanging(int value);
partial void Onpayment_idChanged();
partial void Onrequisition_idChanging(int value);
partial void Onrequisition_idChanged();
partial void Oncompany_idChanging(int value);
partial void Oncompany_idChanged();
partial void Onfund_idChanging(int value);
partial void Onfund_idChanged();
partial void Ondepartment_idChanging(int value);
partial void Ondepartment_idChanged();
partial void Onaccount_idChanging(int value);
partial void Onaccount_idChanged();
partial void OnamountChanging(decimal value);
partial void OnamountChanged();
partial void Oncreated_byChanging(string value);
partial void Oncreated_byChanged();
partial void Onmodified_byChanging(string value);
partial void Onmodified_byChanged();
partial void Ondate_createdChanging(System.DateTime value);
partial void Ondate_createdChanged();
partial void Ondate_modifiedChanging(System.DateTime value);
partial void Ondate_modifiedChanged();
partial void OnactiveChanging(bool value);
partial void OnactiveChanged();
partial void Onfiscal_year_startChanging(System.DateTime value);
partial void Onfiscal_year_startChanged();
#endregion
public PaymentChargeData()
{
this._PaymentData = default(EntityRef<PaymentData>);
this._RequisitionData = default(EntityRef<RequisitionData>);
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_charge_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
public int charge_id
{
get
{
return this._charge_id;
}
set
{
if ((this._charge_id != value))
{
this.Oncharge_idChanging(value);
this.SendPropertyChanging();
this._charge_id = value;
this.SendPropertyChanged("charge_id");
this.Oncharge_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_payment_id", DbType="Int NOT NULL")]
public int payment_id
{
get
{
return this._payment_id;
}
set
{
if ((this._payment_id != value))
{
if (this._PaymentData.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.Onpayment_idChanging(value);
this.SendPropertyChanging();
this._payment_id = value;
this.SendPropertyChanged("payment_id");
this.Onpayment_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_requisition_id", DbType="Int NOT NULL")]
public int requisition_id
{
get
{
return this._requisition_id;
}
set
{
if ((this._requisition_id != value))
{
if (this._RequisitionData.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.Onrequisition_idChanging(value);
this.SendPropertyChanging();
this._requisition_id = value;
this.SendPropertyChanged("requisition_id");
this.Onrequisition_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_company_id", DbType="Int NOT NULL")]
public int company_id
{
get
{
return this._company_id;
}
set
{
if ((this._company_id != value))
{
this.Oncompany_idChanging(value);
this.SendPropertyChanging();
this._company_id = value;
this.SendPropertyChanged("company_id");
this.Oncompany_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_fund_id", DbType="Int NOT NULL")]
public int fund_id
{
get
{
return this._fund_id;
}
set
{
if ((this._fund_id != value))
{
this.Onfund_idChanging(value);
this.SendPropertyChanging();
this._fund_id = value;
this.SendPropertyChanged("fund_id");
this.Onfund_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_department_id", DbType="Int NOT NULL")]
public int department_id
{
get
{
return this._department_id;
}
set
{
if ((this._department_id != value))
{
this.Ondepartment_idChanging(value);
this.SendPropertyChanging();
this._department_id = value;
this.SendPropertyChanged("department_id");
this.Ondepartment_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_account_id", DbType="Int NOT NULL")]
public int account_id
{
get
{
return this._account_id;
}
set
{
if ((this._account_id != value))
{
this.Onaccount_idChanging(value);
this.SendPropertyChanging();
this._account_id = value;
this.SendPropertyChanged("account_id");
this.Onaccount_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_amount", DbType="Decimal(10,2) NOT NULL")]
public decimal amount
{
get
{
return this._amount;
}
set
{
if ((this._amount != value))
{
this.OnamountChanging(value);
this.SendPropertyChanging();
this._amount = value;
this.SendPropertyChanged("amount");
this.OnamountChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_created_by", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
public string created_by
{
get
{
return this._created_by;
}
set
{
if ((this._created_by != value))
{
this.Oncreated_byChanging(value);
this.SendPropertyChanging();
this._created_by = value;
this.SendPropertyChanged("created_by");
this.Oncreated_byChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_modified_by", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
public string modified_by
{
get
{
return this._modified_by;
}
set
{
if ((this._modified_by != value))
{
this.Onmodified_byChanging(value);
this.SendPropertyChanging();
this._modified_by = value;
this.SendPropertyChanged("modified_by");
this.Onmodified_byChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_created", DbType="DateTime NOT NULL")]
public System.DateTime date_created
{
get
{
return this._date_created;
}
set
{
if ((this._date_created != value))
{
this.Ondate_createdChanging(value);
this.SendPropertyChanging();
this._date_created = value;
this.SendPropertyChanged("date_created");
this.Ondate_createdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_modified", DbType="DateTime NOT NULL")]
public System.DateTime date_modified
{
get
{
return this._date_modified;
}
set
{
if ((this._date_modified != value))
{
this.Ondate_modifiedChanging(value);
this.SendPropertyChanging();
this._date_modified = value;
this.SendPropertyChanged("date_modified");
this.Ondate_modifiedChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_active", DbType="Bit NOT NULL")]
public bool active
{
get
{
return this._active;
}
set
{
if ((this._active != value))
{
this.OnactiveChanging(value);
this.SendPropertyChanging();
this._active = value;
this.SendPropertyChanged("active");
this.OnactiveChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_fiscal_year_start", DbType="DateTime NOT NULL")]
public System.DateTime fiscal_year_start
{
get
{
return this._fiscal_year_start;
}
set
{
if ((this._fiscal_year_start != value))
{
this.Onfiscal_year_startChanging(value);
this.SendPropertyChanging();
this._fiscal_year_start = value;
this.SendPropertyChanged("fiscal_year_start");
this.Onfiscal_year_startChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="PaymentData_PaymentChargeData", Storage="_PaymentData", ThisKey="payment_id", OtherKey="payment_id", IsForeignKey=true)]
public PaymentData PaymentData
{
get
{
return this._PaymentData.Entity;
}
set
{
PaymentData previousValue = this._PaymentData.Entity;
if (((previousValue != value)
|| (this._PaymentData.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._PaymentData.Entity = null;
previousValue.PaymentChargeDatas.Remove(this);
}
this._PaymentData.Entity = value;
if ((value != null))
{
value.PaymentChargeDatas.Add(this);
this._payment_id = value.payment_id;
}
else
{
this._payment_id = default(int);
}
this.SendPropertyChanged("PaymentData");
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="RequisitionData_PaymentChargeData", Storage="_RequisitionData", ThisKey="requisition_id", OtherKey="requisition_id", IsForeignKey=true)]
public RequisitionData RequisitionData
{
get
{
return this._RequisitionData.Entity;
}
set
{
RequisitionData previousValue = this._RequisitionData.Entity;
if (((previousValue != value)
|| (this._RequisitionData.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._RequisitionData.Entity = null;
previousValue.PaymentChargeDatas.Remove(this);
}
this._RequisitionData.Entity = value;
if ((value != null))
{
value.PaymentChargeDatas.Add(this);
this._requisition_id = value.requisition_id;
}
else
{
this._requisition_id = default(int);
}
this.SendPropertyChanged("RequisitionData");
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo._org_secc_Purchasing_Attachment")]
public partial class AttachmentData : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _attachment_id;
private string _parent_object_type_name;
private int _parent_identifier;
private int _blob_id;
private int _organization_id;
private string _created_by;
private string _modified_by;
private System.DateTime _date_created;
private System.DateTime _date_modified;
private bool _active;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void Onattachment_idChanging(int value);
partial void Onattachment_idChanged();
partial void Onparent_object_type_nameChanging(string value);
partial void Onparent_object_type_nameChanged();
partial void Onparent_identifierChanging(int value);
partial void Onparent_identifierChanged();
partial void Onblob_idChanging(int value);
partial void Onblob_idChanged();
partial void Onorganization_idChanging(int value);
partial void Onorganization_idChanged();
partial void Oncreated_byChanging(string value);
partial void Oncreated_byChanged();
partial void Onmodified_byChanging(string value);
partial void Onmodified_byChanged();
partial void Ondate_createdChanging(System.DateTime value);
partial void Ondate_createdChanged();
partial void Ondate_modifiedChanging(System.DateTime value);
partial void Ondate_modifiedChanged();
partial void OnactiveChanging(bool value);
partial void OnactiveChanged();
#endregion
public AttachmentData()
{
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_attachment_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
public int attachment_id
{
get
{
return this._attachment_id;
}
set
{
if ((this._attachment_id != value))
{
this.Onattachment_idChanging(value);
this.SendPropertyChanging();
this._attachment_id = value;
this.SendPropertyChanged("attachment_id");
this.Onattachment_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_parent_object_type_name", DbType="VarChar(400) NOT NULL", CanBeNull=false)]
public string parent_object_type_name
{
get
{
return this._parent_object_type_name;
}
set
{
if ((this._parent_object_type_name != value))
{
this.Onparent_object_type_nameChanging(value);
this.SendPropertyChanging();
this._parent_object_type_name = value;
this.SendPropertyChanged("parent_object_type_name");
this.Onparent_object_type_nameChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_parent_identifier", DbType="Int NOT NULL")]
public int parent_identifier
{
get
{
return this._parent_identifier;
}
set
{
if ((this._parent_identifier != value))
{
this.Onparent_identifierChanging(value);
this.SendPropertyChanging();
this._parent_identifier = value;
this.SendPropertyChanged("parent_identifier");
this.Onparent_identifierChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_blob_id", DbType="Int NOT NULL")]
public int blob_id
{
get
{
return this._blob_id;
}
set
{
if ((this._blob_id != value))
{
this.Onblob_idChanging(value);
this.SendPropertyChanging();
this._blob_id = value;
this.SendPropertyChanged("blob_id");
this.Onblob_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_organization_id", DbType="Int NOT NULL")]
public int organization_id
{
get
{
return this._organization_id;
}
set
{
if ((this._organization_id != value))
{
this.Onorganization_idChanging(value);
this.SendPropertyChanging();
this._organization_id = value;
this.SendPropertyChanged("organization_id");
this.Onorganization_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_created_by", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
public string created_by
{
get
{
return this._created_by;
}
set
{
if ((this._created_by != value))
{
this.Oncreated_byChanging(value);
this.SendPropertyChanging();
this._created_by = value;
this.SendPropertyChanged("created_by");
this.Oncreated_byChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_modified_by", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
public string modified_by
{
get
{
return this._modified_by;
}
set
{
if ((this._modified_by != value))
{
this.Onmodified_byChanging(value);
this.SendPropertyChanging();
this._modified_by = value;
this.SendPropertyChanged("modified_by");
this.Onmodified_byChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_created", DbType="DateTime NOT NULL")]
public System.DateTime date_created
{
get
{
return this._date_created;
}
set
{
if ((this._date_created != value))
{
this.Ondate_createdChanging(value);
this.SendPropertyChanging();
this._date_created = value;
this.SendPropertyChanged("date_created");
this.Ondate_createdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_modified", DbType="DateTime NOT NULL")]
public System.DateTime date_modified
{
get
{
return this._date_modified;
}
set
{
if ((this._date_modified != value))
{
this.Ondate_modifiedChanging(value);
this.SendPropertyChanging();
this._date_modified = value;
this.SendPropertyChanged("date_modified");
this.Ondate_modifiedChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_active", DbType="Bit NOT NULL")]
public bool active
{
get
{
return this._active;
}
set
{
if ((this._active != value))
{
this.OnactiveChanging(value);
this.SendPropertyChanging();
this._active = value;
this.SendPropertyChanged("active");
this.OnactiveChanged();
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo._org_secc_Purchasing_Note")]
public partial class NoteData : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _note_id;
private string _object_type_name;
private int _identifier;
private string _body;
private string _created_by;
private string _modified_by;
private System.DateTime _date_created;
private System.DateTime _date_modified;
private bool _active;
private int _organization_id;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void Onnote_idChanging(int value);
partial void Onnote_idChanged();
partial void Onobject_type_nameChanging(string value);
partial void Onobject_type_nameChanged();
partial void OnidentifierChanging(int value);
partial void OnidentifierChanged();
partial void OnbodyChanging(string value);
partial void OnbodyChanged();
partial void Oncreated_byChanging(string value);
partial void Oncreated_byChanged();
partial void Onmodified_byChanging(string value);
partial void Onmodified_byChanged();
partial void Ondate_createdChanging(System.DateTime value);
partial void Ondate_createdChanged();
partial void Ondate_modifiedChanging(System.DateTime value);
partial void Ondate_modifiedChanged();
partial void OnactiveChanging(bool value);
partial void OnactiveChanged();
partial void Onorganization_idChanging(int value);
partial void Onorganization_idChanged();
#endregion
public NoteData()
{
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_note_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
public int note_id
{
get
{
return this._note_id;
}
set
{
if ((this._note_id != value))
{
this.Onnote_idChanging(value);
this.SendPropertyChanging();
this._note_id = value;
this.SendPropertyChanged("note_id");
this.Onnote_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_object_type_name", DbType="VarChar(400) NOT NULL", CanBeNull=false)]
public string object_type_name
{
get
{
return this._object_type_name;
}
set
{
if ((this._object_type_name != value))
{
this.Onobject_type_nameChanging(value);
this.SendPropertyChanging();
this._object_type_name = value;
this.SendPropertyChanged("object_type_name");
this.Onobject_type_nameChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_identifier", DbType="Int NOT NULL")]
public int identifier
{
get
{
return this._identifier;
}
set
{
if ((this._identifier != value))
{
this.OnidentifierChanging(value);
this.SendPropertyChanging();
this._identifier = value;
this.SendPropertyChanged("identifier");
this.OnidentifierChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_body", DbType="VarChar(MAX)")]
public string body
{
get
{
return this._body;
}
set
{
if ((this._body != value))
{
this.OnbodyChanging(value);
this.SendPropertyChanging();
this._body = value;
this.SendPropertyChanged("body");
this.OnbodyChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_created_by", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
public string created_by
{
get
{
return this._created_by;
}
set
{
if ((this._created_by != value))
{
this.Oncreated_byChanging(value);
this.SendPropertyChanging();
this._created_by = value;
this.SendPropertyChanged("created_by");
this.Oncreated_byChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_modified_by", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
public string modified_by
{
get
{
return this._modified_by;
}
set
{
if ((this._modified_by != value))
{
this.Onmodified_byChanging(value);
this.SendPropertyChanging();
this._modified_by = value;
this.SendPropertyChanged("modified_by");
this.Onmodified_byChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_created", DbType="DateTime NOT NULL")]
public System.DateTime date_created
{
get
{
return this._date_created;
}
set
{
if ((this._date_created != value))
{
this.Ondate_createdChanging(value);
this.SendPropertyChanging();
this._date_created = value;
this.SendPropertyChanged("date_created");
this.Ondate_createdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_modified", DbType="DateTime NOT NULL")]
public System.DateTime date_modified
{
get
{
return this._date_modified;
}
set
{
if ((this._date_modified != value))
{
this.Ondate_modifiedChanging(value);
this.SendPropertyChanging();
this._date_modified = value;
this.SendPropertyChanged("date_modified");
this.Ondate_modifiedChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_active", DbType="Bit NOT NULL")]
public bool active
{
get
{
return this._active;
}
set
{
if ((this._active != value))
{
this.OnactiveChanging(value);
this.SendPropertyChanging();
this._active = value;
this.SendPropertyChanged("active");
this.OnactiveChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_organization_id", DbType="Int NOT NULL")]
public int organization_id
{
get
{
return this._organization_id;
}
set
{
if ((this._organization_id != value))
{
this.Onorganization_idChanging(value);
this.SendPropertyChanging();
this._organization_id = value;
this.SendPropertyChanged("organization_id");
this.Onorganization_idChanged();
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo._org_secc_Purchasing_Vendor")]
public partial class VendorData : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _vendor_id;
private string _vendor_name;
private System.Guid _vendor_guid;
private int _organization_id;
private System.DateTime _date_created;
private string _created_by;
private System.DateTime _date_modified;
private string _modified_by;
private bool _active;
private string _address;
private string _phone;
private string _web_address;
private string _terms;
private EntitySet<PurchaseOrderData> _PurchaseOrderDatas;
private EntitySet<RequisitionData> _RequisitionDatas;
private EntitySet<CapitalRequestBidData> _CapitalRequestBidDatas;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void Onvendor_idChanging(int value);
partial void Onvendor_idChanged();
partial void Onvendor_nameChanging(string value);
partial void Onvendor_nameChanged();
partial void Onvendor_guidChanging(System.Guid value);
partial void Onvendor_guidChanged();
partial void Onorganization_idChanging(int value);
partial void Onorganization_idChanged();
partial void Ondate_createdChanging(System.DateTime value);
partial void Ondate_createdChanged();
partial void Oncreated_byChanging(string value);
partial void Oncreated_byChanged();
partial void Ondate_modifiedChanging(System.DateTime value);
partial void Ondate_modifiedChanged();
partial void Onmodified_byChanging(string value);
partial void Onmodified_byChanged();
partial void OnactiveChanging(bool value);
partial void OnactiveChanged();
partial void OnaddressChanging(string value);
partial void OnaddressChanged();
partial void OnphoneChanging(string value);
partial void OnphoneChanged();
partial void Onweb_addressChanging(string value);
partial void Onweb_addressChanged();
partial void OntermsChanging(string value);
partial void OntermsChanged();
#endregion
public VendorData()
{
this._PurchaseOrderDatas = new EntitySet<PurchaseOrderData>(new Action<PurchaseOrderData>(this.attach_PurchaseOrderDatas), new Action<PurchaseOrderData>(this.detach_PurchaseOrderDatas));
this._RequisitionDatas = new EntitySet<RequisitionData>(new Action<RequisitionData>(this.attach_RequisitionDatas), new Action<RequisitionData>(this.detach_RequisitionDatas));
this._CapitalRequestBidDatas = new EntitySet<CapitalRequestBidData>(new Action<CapitalRequestBidData>(this.attach_CapitalRequestBidDatas), new Action<CapitalRequestBidData>(this.detach_CapitalRequestBidDatas));
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_vendor_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
public int vendor_id
{
get
{
return this._vendor_id;
}
set
{
if ((this._vendor_id != value))
{
this.Onvendor_idChanging(value);
this.SendPropertyChanging();
this._vendor_id = value;
this.SendPropertyChanged("vendor_id");
this.Onvendor_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_vendor_name", DbType="NVarChar(100) NOT NULL", CanBeNull=false)]
public string vendor_name
{
get
{
return this._vendor_name;
}
set
{
if ((this._vendor_name != value))
{
this.Onvendor_nameChanging(value);
this.SendPropertyChanging();
this._vendor_name = value;
this.SendPropertyChanged("vendor_name");
this.Onvendor_nameChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_vendor_guid", DbType="UniqueIdentifier NOT NULL")]
public System.Guid vendor_guid
{
get
{
return this._vendor_guid;
}
set
{
if ((this._vendor_guid != value))
{
this.Onvendor_guidChanging(value);
this.SendPropertyChanging();
this._vendor_guid = value;
this.SendPropertyChanged("vendor_guid");
this.Onvendor_guidChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_organization_id", DbType="Int NOT NULL")]
public int organization_id
{
get
{
return this._organization_id;
}
set
{
if ((this._organization_id != value))
{
this.Onorganization_idChanging(value);
this.SendPropertyChanging();
this._organization_id = value;
this.SendPropertyChanged("organization_id");
this.Onorganization_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_created", DbType="DateTime NOT NULL")]
public System.DateTime date_created
{
get
{
return this._date_created;
}
set
{
if ((this._date_created != value))
{
this.Ondate_createdChanging(value);
this.SendPropertyChanging();
this._date_created = value;
this.SendPropertyChanged("date_created");
this.Ondate_createdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_created_by", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
public string created_by
{
get
{
return this._created_by;
}
set
{
if ((this._created_by != value))
{
this.Oncreated_byChanging(value);
this.SendPropertyChanging();
this._created_by = value;
this.SendPropertyChanged("created_by");
this.Oncreated_byChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_modified", DbType="DateTime NOT NULL")]
public System.DateTime date_modified
{
get
{
return this._date_modified;
}
set
{
if ((this._date_modified != value))
{
this.Ondate_modifiedChanging(value);
this.SendPropertyChanging();
this._date_modified = value;
this.SendPropertyChanged("date_modified");
this.Ondate_modifiedChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_modified_by", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
public string modified_by
{
get
{
return this._modified_by;
}
set
{
if ((this._modified_by != value))
{
this.Onmodified_byChanging(value);
this.SendPropertyChanging();
this._modified_by = value;
this.SendPropertyChanged("modified_by");
this.Onmodified_byChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_active", DbType="Bit NOT NULL")]
public bool active
{
get
{
return this._active;
}
set
{
if ((this._active != value))
{
this.OnactiveChanging(value);
this.SendPropertyChanging();
this._active = value;
this.SendPropertyChanged("active");
this.OnactiveChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_address", DbType="VarChar(1000)")]
public string address
{
get
{
return this._address;
}
set
{
if ((this._address != value))
{
this.OnaddressChanging(value);
this.SendPropertyChanging();
this._address = value;
this.SendPropertyChanged("address");
this.OnaddressChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_phone", DbType="VarChar(25)")]
public string phone
{
get
{
return this._phone;
}
set
{
if ((this._phone != value))
{
this.OnphoneChanging(value);
this.SendPropertyChanging();
this._phone = value;
this.SendPropertyChanged("phone");
this.OnphoneChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_web_address", DbType="VarChar(255)")]
public string web_address
{
get
{
return this._web_address;
}
set
{
if ((this._web_address != value))
{
this.Onweb_addressChanging(value);
this.SendPropertyChanging();
this._web_address = value;
this.SendPropertyChanged("web_address");
this.Onweb_addressChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_terms", DbType="VarChar(50)")]
public string terms
{
get
{
return this._terms;
}
set
{
if ((this._terms != value))
{
this.OntermsChanging(value);
this.SendPropertyChanging();
this._terms = value;
this.SendPropertyChanged("terms");
this.OntermsChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="VendorData_PurchaseOrderData", Storage="_PurchaseOrderDatas", ThisKey="vendor_id", OtherKey="vendor_id")]
public EntitySet<PurchaseOrderData> PurchaseOrderDatas
{
get
{
return this._PurchaseOrderDatas;
}
set
{
this._PurchaseOrderDatas.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="VendorData_RequisitionData", Storage="_RequisitionDatas", ThisKey="vendor_id", OtherKey="pref_vendor_id")]
public EntitySet<RequisitionData> RequisitionDatas
{
get
{
return this._RequisitionDatas;
}
set
{
this._RequisitionDatas.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="VendorData_CapitalRequestBidData", Storage="_CapitalRequestBidDatas", ThisKey="vendor_id", OtherKey="vendor_id")]
public EntitySet<CapitalRequestBidData> CapitalRequestBidDatas
{
get
{
return this._CapitalRequestBidDatas;
}
set
{
this._CapitalRequestBidDatas.Assign(value);
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
private void attach_PurchaseOrderDatas(PurchaseOrderData entity)
{
this.SendPropertyChanging();
entity.VendorData = this;
}
private void detach_PurchaseOrderDatas(PurchaseOrderData entity)
{
this.SendPropertyChanging();
entity.VendorData = null;
}
private void attach_RequisitionDatas(RequisitionData entity)
{
this.SendPropertyChanging();
entity.VendorData = this;
}
private void detach_RequisitionDatas(RequisitionData entity)
{
this.SendPropertyChanging();
entity.VendorData = null;
}
private void attach_CapitalRequestBidDatas(CapitalRequestBidData entity)
{
this.SendPropertyChanging();
entity.VendorData = this;
}
private void detach_CapitalRequestBidDatas(CapitalRequestBidData entity)
{
this.SendPropertyChanging();
entity.VendorData = null;
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo._org_secc_Purchasing_PurchaseOrder")]
public partial class PurchaseOrderData : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _purchase_order_id;
private int _vendor_id;
private int _purchase_order_type_luid;
private int _organization_id;
private string _created_by;
private string _modified_by;
private System.DateTime _date_created;
private System.DateTime _date_modified;
private bool _active;
private System.Nullable<System.DateTime> _date_ordered;
private System.Nullable<int> _ordered_by;
private int _status_luid;
private System.Nullable<System.DateTime> _date_received;
private System.Nullable<System.DateTime> _date_closed;
private string _ship_to_address;
private string _ship_to_name;
private string _ship_to_attention;
private System.Nullable<decimal> _shipping_charge;
private System.Nullable<decimal> _other_charge;
private System.Nullable<int> _default_payment_method_id;
private string _terms;
private bool _has_been_billed;
private EntitySet<PurchaseOrderItemData> _PurchaseOrderItemDatas;
private EntitySet<ReceiptData> _ReceiptDatas;
private EntitySet<PaymentData> _PaymentDatas;
private EntityRef<PaymentMethodData> _PaymentMethodData;
private EntityRef<VendorData> _VendorData;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void Onpurchase_order_idChanging(int value);
partial void Onpurchase_order_idChanged();
partial void Onvendor_idChanging(int value);
partial void Onvendor_idChanged();
partial void Onpurchase_order_type_luidChanging(int value);
partial void Onpurchase_order_type_luidChanged();
partial void Onorganization_idChanging(int value);
partial void Onorganization_idChanged();
partial void Oncreated_byChanging(string value);
partial void Oncreated_byChanged();
partial void Onmodified_byChanging(string value);
partial void Onmodified_byChanged();
partial void Ondate_createdChanging(System.DateTime value);
partial void Ondate_createdChanged();
partial void Ondate_modifiedChanging(System.DateTime value);
partial void Ondate_modifiedChanged();
partial void OnactiveChanging(bool value);
partial void OnactiveChanged();
partial void Ondate_orderedChanging(System.Nullable<System.DateTime> value);
partial void Ondate_orderedChanged();
partial void Onordered_byChanging(System.Nullable<int> value);
partial void Onordered_byChanged();
partial void Onstatus_luidChanging(int value);
partial void Onstatus_luidChanged();
partial void Ondate_receivedChanging(System.Nullable<System.DateTime> value);
partial void Ondate_receivedChanged();
partial void Ondate_closedChanging(System.Nullable<System.DateTime> value);
partial void Ondate_closedChanged();
partial void Onship_to_addressChanging(string value);
partial void Onship_to_addressChanged();
partial void Onship_to_nameChanging(string value);
partial void Onship_to_nameChanged();
partial void Onship_to_attentionChanging(string value);
partial void Onship_to_attentionChanged();
partial void Onshipping_chargeChanging(System.Nullable<decimal> value);
partial void Onshipping_chargeChanged();
partial void Onother_chargeChanging(System.Nullable<decimal> value);
partial void Onother_chargeChanged();
partial void Ondefault_payment_method_idChanging(System.Nullable<int> value);
partial void Ondefault_payment_method_idChanged();
partial void OntermsChanging(string value);
partial void OntermsChanged();
partial void Onhas_been_billedChanging(bool value);
partial void Onhas_been_billedChanged();
#endregion
public PurchaseOrderData()
{
this._PurchaseOrderItemDatas = new EntitySet<PurchaseOrderItemData>(new Action<PurchaseOrderItemData>(this.attach_PurchaseOrderItemDatas), new Action<PurchaseOrderItemData>(this.detach_PurchaseOrderItemDatas));
this._ReceiptDatas = new EntitySet<ReceiptData>(new Action<ReceiptData>(this.attach_ReceiptDatas), new Action<ReceiptData>(this.detach_ReceiptDatas));
this._PaymentDatas = new EntitySet<PaymentData>(new Action<PaymentData>(this.attach_PaymentDatas), new Action<PaymentData>(this.detach_PaymentDatas));
this._PaymentMethodData = default(EntityRef<PaymentMethodData>);
this._VendorData = default(EntityRef<VendorData>);
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_purchase_order_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
public int purchase_order_id
{
get
{
return this._purchase_order_id;
}
set
{
if ((this._purchase_order_id != value))
{
this.Onpurchase_order_idChanging(value);
this.SendPropertyChanging();
this._purchase_order_id = value;
this.SendPropertyChanged("purchase_order_id");
this.Onpurchase_order_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_vendor_id", DbType="Int NOT NULL")]
public int vendor_id
{
get
{
return this._vendor_id;
}
set
{
if ((this._vendor_id != value))
{
if (this._VendorData.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.Onvendor_idChanging(value);
this.SendPropertyChanging();
this._vendor_id = value;
this.SendPropertyChanged("vendor_id");
this.Onvendor_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_purchase_order_type_luid", DbType="Int NOT NULL")]
public int purchase_order_type_luid
{
get
{
return this._purchase_order_type_luid;
}
set
{
if ((this._purchase_order_type_luid != value))
{
this.Onpurchase_order_type_luidChanging(value);
this.SendPropertyChanging();
this._purchase_order_type_luid = value;
this.SendPropertyChanged("purchase_order_type_luid");
this.Onpurchase_order_type_luidChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_organization_id", DbType="Int NOT NULL")]
public int organization_id
{
get
{
return this._organization_id;
}
set
{
if ((this._organization_id != value))
{
this.Onorganization_idChanging(value);
this.SendPropertyChanging();
this._organization_id = value;
this.SendPropertyChanged("organization_id");
this.Onorganization_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_created_by", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
public string created_by
{
get
{
return this._created_by;
}
set
{
if ((this._created_by != value))
{
this.Oncreated_byChanging(value);
this.SendPropertyChanging();
this._created_by = value;
this.SendPropertyChanged("created_by");
this.Oncreated_byChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_modified_by", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
public string modified_by
{
get
{
return this._modified_by;
}
set
{
if ((this._modified_by != value))
{
this.Onmodified_byChanging(value);
this.SendPropertyChanging();
this._modified_by = value;
this.SendPropertyChanged("modified_by");
this.Onmodified_byChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_created", DbType="DateTime NOT NULL")]
public System.DateTime date_created
{
get
{
return this._date_created;
}
set
{
if ((this._date_created != value))
{
this.Ondate_createdChanging(value);
this.SendPropertyChanging();
this._date_created = value;
this.SendPropertyChanged("date_created");
this.Ondate_createdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_modified", DbType="DateTime NOT NULL")]
public System.DateTime date_modified
{
get
{
return this._date_modified;
}
set
{
if ((this._date_modified != value))
{
this.Ondate_modifiedChanging(value);
this.SendPropertyChanging();
this._date_modified = value;
this.SendPropertyChanged("date_modified");
this.Ondate_modifiedChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_active", DbType="Bit NOT NULL")]
public bool active
{
get
{
return this._active;
}
set
{
if ((this._active != value))
{
this.OnactiveChanging(value);
this.SendPropertyChanging();
this._active = value;
this.SendPropertyChanged("active");
this.OnactiveChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_ordered", DbType="DateTime")]
public System.Nullable<System.DateTime> date_ordered
{
get
{
return this._date_ordered;
}
set
{
if ((this._date_ordered != value))
{
this.Ondate_orderedChanging(value);
this.SendPropertyChanging();
this._date_ordered = value;
this.SendPropertyChanged("date_ordered");
this.Ondate_orderedChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ordered_by", DbType="Int")]
public System.Nullable<int> ordered_by
{
get
{
return this._ordered_by;
}
set
{
if ((this._ordered_by != value))
{
this.Onordered_byChanging(value);
this.SendPropertyChanging();
this._ordered_by = value;
this.SendPropertyChanged("ordered_by");
this.Onordered_byChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_status_luid", DbType="Int NOT NULL")]
public int status_luid
{
get
{
return this._status_luid;
}
set
{
if ((this._status_luid != value))
{
this.Onstatus_luidChanging(value);
this.SendPropertyChanging();
this._status_luid = value;
this.SendPropertyChanged("status_luid");
this.Onstatus_luidChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_received", DbType="DateTime")]
public System.Nullable<System.DateTime> date_received
{
get
{
return this._date_received;
}
set
{
if ((this._date_received != value))
{
this.Ondate_receivedChanging(value);
this.SendPropertyChanging();
this._date_received = value;
this.SendPropertyChanged("date_received");
this.Ondate_receivedChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_closed", DbType="DateTime")]
public System.Nullable<System.DateTime> date_closed
{
get
{
return this._date_closed;
}
set
{
if ((this._date_closed != value))
{
this.Ondate_closedChanging(value);
this.SendPropertyChanging();
this._date_closed = value;
this.SendPropertyChanged("date_closed");
this.Ondate_closedChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ship_to_address", DbType="VarChar(1000)")]
public string ship_to_address
{
get
{
return this._ship_to_address;
}
set
{
if ((this._ship_to_address != value))
{
this.Onship_to_addressChanging(value);
this.SendPropertyChanging();
this._ship_to_address = value;
this.SendPropertyChanged("ship_to_address");
this.Onship_to_addressChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ship_to_name", DbType="VarChar(100)")]
public string ship_to_name
{
get
{
return this._ship_to_name;
}
set
{
if ((this._ship_to_name != value))
{
this.Onship_to_nameChanging(value);
this.SendPropertyChanging();
this._ship_to_name = value;
this.SendPropertyChanged("ship_to_name");
this.Onship_to_nameChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ship_to_attention", DbType="VarChar(100)")]
public string ship_to_attention
{
get
{
return this._ship_to_attention;
}
set
{
if ((this._ship_to_attention != value))
{
this.Onship_to_attentionChanging(value);
this.SendPropertyChanging();
this._ship_to_attention = value;
this.SendPropertyChanged("ship_to_attention");
this.Onship_to_attentionChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_shipping_charge", DbType="Decimal(10,2)")]
public System.Nullable<decimal> shipping_charge
{
get
{
return this._shipping_charge;
}
set
{
if ((this._shipping_charge != value))
{
this.Onshipping_chargeChanging(value);
this.SendPropertyChanging();
this._shipping_charge = value;
this.SendPropertyChanged("shipping_charge");
this.Onshipping_chargeChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_other_charge", DbType="Decimal(10,2)")]
public System.Nullable<decimal> other_charge
{
get
{
return this._other_charge;
}
set
{
if ((this._other_charge != value))
{
this.Onother_chargeChanging(value);
this.SendPropertyChanging();
this._other_charge = value;
this.SendPropertyChanged("other_charge");
this.Onother_chargeChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_default_payment_method_id", DbType="Int")]
public System.Nullable<int> default_payment_method_id
{
get
{
return this._default_payment_method_id;
}
set
{
if ((this._default_payment_method_id != value))
{
if (this._PaymentMethodData.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.Ondefault_payment_method_idChanging(value);
this.SendPropertyChanging();
this._default_payment_method_id = value;
this.SendPropertyChanged("default_payment_method_id");
this.Ondefault_payment_method_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_terms", DbType="VarChar(50)")]
public string terms
{
get
{
return this._terms;
}
set
{
if ((this._terms != value))
{
this.OntermsChanging(value);
this.SendPropertyChanging();
this._terms = value;
this.SendPropertyChanged("terms");
this.OntermsChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_has_been_billed", DbType="Bit NOT NULL")]
public bool has_been_billed
{
get
{
return this._has_been_billed;
}
set
{
if ((this._has_been_billed != value))
{
this.Onhas_been_billedChanging(value);
this.SendPropertyChanging();
this._has_been_billed = value;
this.SendPropertyChanged("has_been_billed");
this.Onhas_been_billedChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="PurchaseOrderData_PurchaseOrderItemData", Storage="_PurchaseOrderItemDatas", ThisKey="purchase_order_id", OtherKey="purchase_order_id")]
public EntitySet<PurchaseOrderItemData> PurchaseOrderItemDatas
{
get
{
return this._PurchaseOrderItemDatas;
}
set
{
this._PurchaseOrderItemDatas.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="PurchaseOrderData_ReceiptData", Storage="_ReceiptDatas", ThisKey="purchase_order_id", OtherKey="purchase_order_id")]
public EntitySet<ReceiptData> ReceiptDatas
{
get
{
return this._ReceiptDatas;
}
set
{
this._ReceiptDatas.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="PurchaseOrderData_PaymentData", Storage="_PaymentDatas", ThisKey="purchase_order_id", OtherKey="purchase_order_id")]
public EntitySet<PaymentData> PaymentDatas
{
get
{
return this._PaymentDatas;
}
set
{
this._PaymentDatas.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="PaymentMethodData_PurchaseOrderData", Storage="_PaymentMethodData", ThisKey="default_payment_method_id", OtherKey="payment_method_id", IsForeignKey=true)]
public PaymentMethodData PaymentMethodData
{
get
{
return this._PaymentMethodData.Entity;
}
set
{
PaymentMethodData previousValue = this._PaymentMethodData.Entity;
if (((previousValue != value)
|| (this._PaymentMethodData.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._PaymentMethodData.Entity = null;
previousValue.PurchaseOrderDatas.Remove(this);
}
this._PaymentMethodData.Entity = value;
if ((value != null))
{
value.PurchaseOrderDatas.Add(this);
this._default_payment_method_id = value.payment_method_id;
}
else
{
this._default_payment_method_id = default(Nullable<int>);
}
this.SendPropertyChanged("PaymentMethodData");
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="VendorData_PurchaseOrderData", Storage="_VendorData", ThisKey="vendor_id", OtherKey="vendor_id", IsForeignKey=true)]
public VendorData VendorData
{
get
{
return this._VendorData.Entity;
}
set
{
VendorData previousValue = this._VendorData.Entity;
if (((previousValue != value)
|| (this._VendorData.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._VendorData.Entity = null;
previousValue.PurchaseOrderDatas.Remove(this);
}
this._VendorData.Entity = value;
if ((value != null))
{
value.PurchaseOrderDatas.Add(this);
this._vendor_id = value.vendor_id;
}
else
{
this._vendor_id = default(int);
}
this.SendPropertyChanged("VendorData");
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
private void attach_PurchaseOrderItemDatas(PurchaseOrderItemData entity)
{
this.SendPropertyChanging();
entity.PurchaseOrderData = this;
}
private void detach_PurchaseOrderItemDatas(PurchaseOrderItemData entity)
{
this.SendPropertyChanging();
entity.PurchaseOrderData = null;
}
private void attach_ReceiptDatas(ReceiptData entity)
{
this.SendPropertyChanging();
entity.PurchaseOrderData = this;
}
private void detach_ReceiptDatas(ReceiptData entity)
{
this.SendPropertyChanging();
entity.PurchaseOrderData = null;
}
private void attach_PaymentDatas(PaymentData entity)
{
this.SendPropertyChanging();
entity.PurchaseOrderData = this;
}
private void detach_PaymentDatas(PaymentData entity)
{
this.SendPropertyChanging();
entity.PurchaseOrderData = null;
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo._org_secc_Purchasing_Requisition")]
public partial class RequisitionData : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _requisition_id;
private string _title;
private int _requisition_type_luid;
private int _requester_id;
private int _status_luid;
private string _deliver_to;
private bool _is_approved;
private bool _is_open;
private System.Nullable<int> _pref_vendor_id;
private string _pref_vendor_name;
private string _pref_vendor_address;
private string _pref_vendor_phone;
private string _pref_vendor_webaddress;
private string _created_by;
private string _modified_by;
private System.Nullable<System.DateTime> _date_accepted;
private System.Nullable<System.DateTime> _date_purchased;
private System.DateTime _date_created;
private System.Nullable<System.DateTime> _date_modified;
private bool _active;
private int _organization_id;
private System.Nullable<System.DateTime> _date_submitted;
private System.Nullable<int> _accepted_by_personid;
private System.Nullable<int> _ministry_luid;
private System.Nullable<int> _location_luid;
private System.Nullable<int> _capital_request_id;
private System.Nullable<int> _assigned_to_person_id;
private EntitySet<RequisitionItemData> _RequisitionItemDatas;
private EntitySet<PaymentChargeData> _PaymentChargeDatas;
private EntityRef<VendorData> _VendorData;
private EntityRef<CapitalRequestData> _CapitalRequestData;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void Onrequisition_idChanging(int value);
partial void Onrequisition_idChanged();
partial void OntitleChanging(string value);
partial void OntitleChanged();
partial void Onrequisition_type_luidChanging(int value);
partial void Onrequisition_type_luidChanged();
partial void Onrequester_idChanging(int value);
partial void Onrequester_idChanged();
partial void Onstatus_luidChanging(int value);
partial void Onstatus_luidChanged();
partial void Ondeliver_toChanging(string value);
partial void Ondeliver_toChanged();
partial void Onis_approvedChanging(bool value);
partial void Onis_approvedChanged();
partial void Onis_openChanging(bool value);
partial void Onis_openChanged();
partial void Onpref_vendor_idChanging(System.Nullable<int> value);
partial void Onpref_vendor_idChanged();
partial void Onpref_vendor_nameChanging(string value);
partial void Onpref_vendor_nameChanged();
partial void Onpref_vendor_addressChanging(string value);
partial void Onpref_vendor_addressChanged();
partial void Onpref_vendor_phoneChanging(string value);
partial void Onpref_vendor_phoneChanged();
partial void Onpref_vendor_webaddressChanging(string value);
partial void Onpref_vendor_webaddressChanged();
partial void Oncreated_byChanging(string value);
partial void Oncreated_byChanged();
partial void Onmodified_byChanging(string value);
partial void Onmodified_byChanged();
partial void Ondate_acceptedChanging(System.Nullable<System.DateTime> value);
partial void Ondate_acceptedChanged();
partial void Ondate_purchasedChanging(System.Nullable<System.DateTime> value);
partial void Ondate_purchasedChanged();
partial void Ondate_createdChanging(System.DateTime value);
partial void Ondate_createdChanged();
partial void Ondate_modifiedChanging(System.Nullable<System.DateTime> value);
partial void Ondate_modifiedChanged();
partial void OnactiveChanging(bool value);
partial void OnactiveChanged();
partial void Onorganization_idChanging(int value);
partial void Onorganization_idChanged();
partial void Ondate_submittedChanging(System.Nullable<System.DateTime> value);
partial void Ondate_submittedChanged();
partial void Onaccepted_by_personidChanging(System.Nullable<int> value);
partial void Onaccepted_by_personidChanged();
partial void Onministry_luidChanging(System.Nullable<int> value);
partial void Onministry_luidChanged();
partial void Onlocation_luidChanging(System.Nullable<int> value);
partial void Onlocation_luidChanged();
partial void Oncapital_request_idChanging(System.Nullable<int> value);
partial void Oncapital_request_idChanged();
partial void Onassigned_to_person_idChanging(System.Nullable<int> value);
partial void Onassigned_to_person_idChanged();
#endregion
public RequisitionData()
{
this._RequisitionItemDatas = new EntitySet<RequisitionItemData>(new Action<RequisitionItemData>(this.attach_RequisitionItemDatas), new Action<RequisitionItemData>(this.detach_RequisitionItemDatas));
this._PaymentChargeDatas = new EntitySet<PaymentChargeData>(new Action<PaymentChargeData>(this.attach_PaymentChargeDatas), new Action<PaymentChargeData>(this.detach_PaymentChargeDatas));
this._VendorData = default(EntityRef<VendorData>);
this._CapitalRequestData = default(EntityRef<CapitalRequestData>);
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_requisition_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
public int requisition_id
{
get
{
return this._requisition_id;
}
set
{
if ((this._requisition_id != value))
{
this.Onrequisition_idChanging(value);
this.SendPropertyChanging();
this._requisition_id = value;
this.SendPropertyChanged("requisition_id");
this.Onrequisition_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_title", DbType="VarChar(200) NOT NULL", CanBeNull=false)]
public string title
{
get
{
return this._title;
}
set
{
if ((this._title != value))
{
this.OntitleChanging(value);
this.SendPropertyChanging();
this._title = value;
this.SendPropertyChanged("title");
this.OntitleChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_requisition_type_luid", DbType="Int NOT NULL")]
public int requisition_type_luid
{
get
{
return this._requisition_type_luid;
}
set
{
if ((this._requisition_type_luid != value))
{
this.Onrequisition_type_luidChanging(value);
this.SendPropertyChanging();
this._requisition_type_luid = value;
this.SendPropertyChanged("requisition_type_luid");
this.Onrequisition_type_luidChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_requester_id", DbType="Int NOT NULL")]
public int requester_id
{
get
{
return this._requester_id;
}
set
{
if ((this._requester_id != value))
{
this.Onrequester_idChanging(value);
this.SendPropertyChanging();
this._requester_id = value;
this.SendPropertyChanged("requester_id");
this.Onrequester_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_status_luid", DbType="Int NOT NULL")]
public int status_luid
{
get
{
return this._status_luid;
}
set
{
if ((this._status_luid != value))
{
this.Onstatus_luidChanging(value);
this.SendPropertyChanging();
this._status_luid = value;
this.SendPropertyChanged("status_luid");
this.Onstatus_luidChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_deliver_to", DbType="VarChar(500)")]
public string deliver_to
{
get
{
return this._deliver_to;
}
set
{
if ((this._deliver_to != value))
{
this.Ondeliver_toChanging(value);
this.SendPropertyChanging();
this._deliver_to = value;
this.SendPropertyChanged("deliver_to");
this.Ondeliver_toChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_is_approved", DbType="Bit NOT NULL")]
public bool is_approved
{
get
{
return this._is_approved;
}
set
{
if ((this._is_approved != value))
{
this.Onis_approvedChanging(value);
this.SendPropertyChanging();
this._is_approved = value;
this.SendPropertyChanged("is_approved");
this.Onis_approvedChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_is_open", DbType="Bit NOT NULL")]
public bool is_open
{
get
{
return this._is_open;
}
set
{
if ((this._is_open != value))
{
this.Onis_openChanging(value);
this.SendPropertyChanging();
this._is_open = value;
this.SendPropertyChanged("is_open");
this.Onis_openChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_pref_vendor_id", DbType="Int")]
public System.Nullable<int> pref_vendor_id
{
get
{
return this._pref_vendor_id;
}
set
{
if ((this._pref_vendor_id != value))
{
if (this._VendorData.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.Onpref_vendor_idChanging(value);
this.SendPropertyChanging();
this._pref_vendor_id = value;
this.SendPropertyChanged("pref_vendor_id");
this.Onpref_vendor_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_pref_vendor_name", DbType="VarChar(50)")]
public string pref_vendor_name
{
get
{
return this._pref_vendor_name;
}
set
{
if ((this._pref_vendor_name != value))
{
this.Onpref_vendor_nameChanging(value);
this.SendPropertyChanging();
this._pref_vendor_name = value;
this.SendPropertyChanged("pref_vendor_name");
this.Onpref_vendor_nameChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_pref_vendor_address", DbType="VarChar(1000)")]
public string pref_vendor_address
{
get
{
return this._pref_vendor_address;
}
set
{
if ((this._pref_vendor_address != value))
{
this.Onpref_vendor_addressChanging(value);
this.SendPropertyChanging();
this._pref_vendor_address = value;
this.SendPropertyChanged("pref_vendor_address");
this.Onpref_vendor_addressChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_pref_vendor_phone", DbType="VarChar(25)")]
public string pref_vendor_phone
{
get
{
return this._pref_vendor_phone;
}
set
{
if ((this._pref_vendor_phone != value))
{
this.Onpref_vendor_phoneChanging(value);
this.SendPropertyChanging();
this._pref_vendor_phone = value;
this.SendPropertyChanged("pref_vendor_phone");
this.Onpref_vendor_phoneChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_pref_vendor_webaddress", DbType="VarChar(255)")]
public string pref_vendor_webaddress
{
get
{
return this._pref_vendor_webaddress;
}
set
{
if ((this._pref_vendor_webaddress != value))
{
this.Onpref_vendor_webaddressChanging(value);
this.SendPropertyChanging();
this._pref_vendor_webaddress = value;
this.SendPropertyChanged("pref_vendor_webaddress");
this.Onpref_vendor_webaddressChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_created_by", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
public string created_by
{
get
{
return this._created_by;
}
set
{
if ((this._created_by != value))
{
this.Oncreated_byChanging(value);
this.SendPropertyChanging();
this._created_by = value;
this.SendPropertyChanged("created_by");
this.Oncreated_byChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_modified_by", DbType="VarChar(50)")]
public string modified_by
{
get
{
return this._modified_by;
}
set
{
if ((this._modified_by != value))
{
this.Onmodified_byChanging(value);
this.SendPropertyChanging();
this._modified_by = value;
this.SendPropertyChanged("modified_by");
this.Onmodified_byChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_accepted", DbType="DateTime")]
public System.Nullable<System.DateTime> date_accepted
{
get
{
return this._date_accepted;
}
set
{
if ((this._date_accepted != value))
{
this.Ondate_acceptedChanging(value);
this.SendPropertyChanging();
this._date_accepted = value;
this.SendPropertyChanged("date_accepted");
this.Ondate_acceptedChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_purchased", DbType="DateTime")]
public System.Nullable<System.DateTime> date_purchased
{
get
{
return this._date_purchased;
}
set
{
if ((this._date_purchased != value))
{
this.Ondate_purchasedChanging(value);
this.SendPropertyChanging();
this._date_purchased = value;
this.SendPropertyChanged("date_purchased");
this.Ondate_purchasedChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_created", DbType="DateTime NOT NULL")]
public System.DateTime date_created
{
get
{
return this._date_created;
}
set
{
if ((this._date_created != value))
{
this.Ondate_createdChanging(value);
this.SendPropertyChanging();
this._date_created = value;
this.SendPropertyChanged("date_created");
this.Ondate_createdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_modified", DbType="DateTime")]
public System.Nullable<System.DateTime> date_modified
{
get
{
return this._date_modified;
}
set
{
if ((this._date_modified != value))
{
this.Ondate_modifiedChanging(value);
this.SendPropertyChanging();
this._date_modified = value;
this.SendPropertyChanged("date_modified");
this.Ondate_modifiedChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_active", DbType="Bit NOT NULL")]
public bool active
{
get
{
return this._active;
}
set
{
if ((this._active != value))
{
this.OnactiveChanging(value);
this.SendPropertyChanging();
this._active = value;
this.SendPropertyChanged("active");
this.OnactiveChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_organization_id", DbType="Int NOT NULL")]
public int organization_id
{
get
{
return this._organization_id;
}
set
{
if ((this._organization_id != value))
{
this.Onorganization_idChanging(value);
this.SendPropertyChanging();
this._organization_id = value;
this.SendPropertyChanged("organization_id");
this.Onorganization_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_submitted", DbType="DateTime")]
public System.Nullable<System.DateTime> date_submitted
{
get
{
return this._date_submitted;
}
set
{
if ((this._date_submitted != value))
{
this.Ondate_submittedChanging(value);
this.SendPropertyChanging();
this._date_submitted = value;
this.SendPropertyChanged("date_submitted");
this.Ondate_submittedChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_accepted_by_personid", DbType="Int")]
public System.Nullable<int> accepted_by_personid
{
get
{
return this._accepted_by_personid;
}
set
{
if ((this._accepted_by_personid != value))
{
this.Onaccepted_by_personidChanging(value);
this.SendPropertyChanging();
this._accepted_by_personid = value;
this.SendPropertyChanged("accepted_by_personid");
this.Onaccepted_by_personidChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ministry_luid", DbType="Int")]
public System.Nullable<int> ministry_luid
{
get
{
return this._ministry_luid;
}
set
{
if ((this._ministry_luid != value))
{
this.Onministry_luidChanging(value);
this.SendPropertyChanging();
this._ministry_luid = value;
this.SendPropertyChanged("ministry_luid");
this.Onministry_luidChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_location_luid", DbType="Int")]
public System.Nullable<int> location_luid
{
get
{
return this._location_luid;
}
set
{
if ((this._location_luid != value))
{
this.Onlocation_luidChanging(value);
this.SendPropertyChanging();
this._location_luid = value;
this.SendPropertyChanged("location_luid");
this.Onlocation_luidChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_capital_request_id", DbType="Int")]
public System.Nullable<int> capital_request_id
{
get
{
return this._capital_request_id;
}
set
{
if ((this._capital_request_id != value))
{
if (this._CapitalRequestData.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.Oncapital_request_idChanging(value);
this.SendPropertyChanging();
this._capital_request_id = value;
this.SendPropertyChanged("capital_request_id");
this.Oncapital_request_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_assigned_to_person_id", DbType="Int")]
public System.Nullable<int> assigned_to_person_id
{
get
{
return this._assigned_to_person_id;
}
set
{
if ((this._assigned_to_person_id != value))
{
this.Onassigned_to_person_idChanging(value);
this.SendPropertyChanging();
this._assigned_to_person_id = value;
this.SendPropertyChanged("assigned_to_person_id");
this.Onassigned_to_person_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="RequisitionData_RequisitionItemData", Storage="_RequisitionItemDatas", ThisKey="requisition_id", OtherKey="requisition_id")]
public EntitySet<RequisitionItemData> RequisitionItemDatas
{
get
{
return this._RequisitionItemDatas;
}
set
{
this._RequisitionItemDatas.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="RequisitionData_PaymentChargeData", Storage="_PaymentChargeDatas", ThisKey="requisition_id", OtherKey="requisition_id")]
public EntitySet<PaymentChargeData> PaymentChargeDatas
{
get
{
return this._PaymentChargeDatas;
}
set
{
this._PaymentChargeDatas.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="VendorData_RequisitionData", Storage="_VendorData", ThisKey="pref_vendor_id", OtherKey="vendor_id", IsForeignKey=true)]
public VendorData VendorData
{
get
{
return this._VendorData.Entity;
}
set
{
VendorData previousValue = this._VendorData.Entity;
if (((previousValue != value)
|| (this._VendorData.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._VendorData.Entity = null;
previousValue.RequisitionDatas.Remove(this);
}
this._VendorData.Entity = value;
if ((value != null))
{
value.RequisitionDatas.Add(this);
this._pref_vendor_id = value.vendor_id;
}
else
{
this._pref_vendor_id = default(Nullable<int>);
}
this.SendPropertyChanged("VendorData");
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="CapitalRequestData_RequisitionData", Storage="_CapitalRequestData", ThisKey="capital_request_id", OtherKey="capital_request_id", IsForeignKey=true)]
public CapitalRequestData CapitalRequestData
{
get
{
return this._CapitalRequestData.Entity;
}
set
{
CapitalRequestData previousValue = this._CapitalRequestData.Entity;
if (((previousValue != value)
|| (this._CapitalRequestData.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._CapitalRequestData.Entity = null;
previousValue.RequisitionDatas.Remove(this);
}
this._CapitalRequestData.Entity = value;
if ((value != null))
{
value.RequisitionDatas.Add(this);
this._capital_request_id = value.capital_request_id;
}
else
{
this._capital_request_id = default(Nullable<int>);
}
this.SendPropertyChanged("CapitalRequestData");
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
private void attach_RequisitionItemDatas(RequisitionItemData entity)
{
this.SendPropertyChanging();
entity.RequisitionData = this;
}
private void detach_RequisitionItemDatas(RequisitionItemData entity)
{
this.SendPropertyChanging();
entity.RequisitionData = null;
}
private void attach_PaymentChargeDatas(PaymentChargeData entity)
{
this.SendPropertyChanging();
entity.RequisitionData = this;
}
private void detach_PaymentChargeDatas(PaymentChargeData entity)
{
this.SendPropertyChanging();
entity.RequisitionData = null;
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo._org_secc_Purchasing_CapitalRequestBid")]
public partial class CapitalRequestBidData : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _bid_id;
private int _capital_request_id;
private System.Nullable<int> _vendor_id;
private string _vendor_name;
private string _vendor_contact_name;
private string _vendor_contact_phone;
private string _vendor_contact_email;
private decimal _bid_amount;
private int _quote_blob_id;
private bool _is_preferred_bid;
private string _created_by;
private string _modified_by;
private System.DateTime _date_created;
private System.DateTime _date_modified;
private bool _active;
private int _organization_id;
private EntityRef<VendorData> _VendorData;
private EntityRef<CapitalRequestData> _CapitalRequestData;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void Onbid_idChanging(int value);
partial void Onbid_idChanged();
partial void Oncapital_request_idChanging(int value);
partial void Oncapital_request_idChanged();
partial void Onvendor_idChanging(System.Nullable<int> value);
partial void Onvendor_idChanged();
partial void Onvendor_nameChanging(string value);
partial void Onvendor_nameChanged();
partial void Onvendor_contact_nameChanging(string value);
partial void Onvendor_contact_nameChanged();
partial void Onvendor_contact_phoneChanging(string value);
partial void Onvendor_contact_phoneChanged();
partial void Onvendor_contact_emailChanging(string value);
partial void Onvendor_contact_emailChanged();
partial void Onbid_amountChanging(decimal value);
partial void Onbid_amountChanged();
partial void Onquote_blob_idChanging(int value);
partial void Onquote_blob_idChanged();
partial void Onis_preferred_bidChanging(bool value);
partial void Onis_preferred_bidChanged();
partial void Oncreated_byChanging(string value);
partial void Oncreated_byChanged();
partial void Onmodified_byChanging(string value);
partial void Onmodified_byChanged();
partial void Ondate_createdChanging(System.DateTime value);
partial void Ondate_createdChanged();
partial void Ondate_modifiedChanging(System.DateTime value);
partial void Ondate_modifiedChanged();
partial void OnactiveChanging(bool value);
partial void OnactiveChanged();
partial void Onorganization_idChanging(int value);
partial void Onorganization_idChanged();
#endregion
public CapitalRequestBidData()
{
this._VendorData = default(EntityRef<VendorData>);
this._CapitalRequestData = default(EntityRef<CapitalRequestData>);
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_bid_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
public int bid_id
{
get
{
return this._bid_id;
}
set
{
if ((this._bid_id != value))
{
this.Onbid_idChanging(value);
this.SendPropertyChanging();
this._bid_id = value;
this.SendPropertyChanged("bid_id");
this.Onbid_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_capital_request_id", DbType="Int NOT NULL")]
public int capital_request_id
{
get
{
return this._capital_request_id;
}
set
{
if ((this._capital_request_id != value))
{
if (this._CapitalRequestData.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.Oncapital_request_idChanging(value);
this.SendPropertyChanging();
this._capital_request_id = value;
this.SendPropertyChanged("capital_request_id");
this.Oncapital_request_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_vendor_id", DbType="Int")]
public System.Nullable<int> vendor_id
{
get
{
return this._vendor_id;
}
set
{
if ((this._vendor_id != value))
{
if (this._VendorData.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.Onvendor_idChanging(value);
this.SendPropertyChanging();
this._vendor_id = value;
this.SendPropertyChanged("vendor_id");
this.Onvendor_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_vendor_name", DbType="VarChar(100)")]
public string vendor_name
{
get
{
return this._vendor_name;
}
set
{
if ((this._vendor_name != value))
{
this.Onvendor_nameChanging(value);
this.SendPropertyChanging();
this._vendor_name = value;
this.SendPropertyChanged("vendor_name");
this.Onvendor_nameChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_vendor_contact_name", DbType="VarChar(100)")]
public string vendor_contact_name
{
get
{
return this._vendor_contact_name;
}
set
{
if ((this._vendor_contact_name != value))
{
this.Onvendor_contact_nameChanging(value);
this.SendPropertyChanging();
this._vendor_contact_name = value;
this.SendPropertyChanged("vendor_contact_name");
this.Onvendor_contact_nameChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_vendor_contact_phone", DbType="VarChar(50)")]
public string vendor_contact_phone
{
get
{
return this._vendor_contact_phone;
}
set
{
if ((this._vendor_contact_phone != value))
{
this.Onvendor_contact_phoneChanging(value);
this.SendPropertyChanging();
this._vendor_contact_phone = value;
this.SendPropertyChanged("vendor_contact_phone");
this.Onvendor_contact_phoneChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_vendor_contact_email", DbType="VarChar(200)")]
public string vendor_contact_email
{
get
{
return this._vendor_contact_email;
}
set
{
if ((this._vendor_contact_email != value))
{
this.Onvendor_contact_emailChanging(value);
this.SendPropertyChanging();
this._vendor_contact_email = value;
this.SendPropertyChanged("vendor_contact_email");
this.Onvendor_contact_emailChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_bid_amount", DbType="Decimal(10,2) NOT NULL")]
public decimal bid_amount
{
get
{
return this._bid_amount;
}
set
{
if ((this._bid_amount != value))
{
this.Onbid_amountChanging(value);
this.SendPropertyChanging();
this._bid_amount = value;
this.SendPropertyChanged("bid_amount");
this.Onbid_amountChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_quote_blob_id", DbType="Int NOT NULL")]
public int quote_blob_id
{
get
{
return this._quote_blob_id;
}
set
{
if ((this._quote_blob_id != value))
{
this.Onquote_blob_idChanging(value);
this.SendPropertyChanging();
this._quote_blob_id = value;
this.SendPropertyChanged("quote_blob_id");
this.Onquote_blob_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_is_preferred_bid", DbType="Bit NOT NULL")]
public bool is_preferred_bid
{
get
{
return this._is_preferred_bid;
}
set
{
if ((this._is_preferred_bid != value))
{
this.Onis_preferred_bidChanging(value);
this.SendPropertyChanging();
this._is_preferred_bid = value;
this.SendPropertyChanged("is_preferred_bid");
this.Onis_preferred_bidChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_created_by", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
public string created_by
{
get
{
return this._created_by;
}
set
{
if ((this._created_by != value))
{
this.Oncreated_byChanging(value);
this.SendPropertyChanging();
this._created_by = value;
this.SendPropertyChanged("created_by");
this.Oncreated_byChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_modified_by", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
public string modified_by
{
get
{
return this._modified_by;
}
set
{
if ((this._modified_by != value))
{
this.Onmodified_byChanging(value);
this.SendPropertyChanging();
this._modified_by = value;
this.SendPropertyChanged("modified_by");
this.Onmodified_byChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_created", DbType="DateTime NOT NULL")]
public System.DateTime date_created
{
get
{
return this._date_created;
}
set
{
if ((this._date_created != value))
{
this.Ondate_createdChanging(value);
this.SendPropertyChanging();
this._date_created = value;
this.SendPropertyChanged("date_created");
this.Ondate_createdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_modified", DbType="DateTime NOT NULL")]
public System.DateTime date_modified
{
get
{
return this._date_modified;
}
set
{
if ((this._date_modified != value))
{
this.Ondate_modifiedChanging(value);
this.SendPropertyChanging();
this._date_modified = value;
this.SendPropertyChanged("date_modified");
this.Ondate_modifiedChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_active", DbType="Bit NOT NULL")]
public bool active
{
get
{
return this._active;
}
set
{
if ((this._active != value))
{
this.OnactiveChanging(value);
this.SendPropertyChanging();
this._active = value;
this.SendPropertyChanged("active");
this.OnactiveChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_organization_id", DbType="Int NOT NULL")]
public int organization_id
{
get
{
return this._organization_id;
}
set
{
if ((this._organization_id != value))
{
this.Onorganization_idChanging(value);
this.SendPropertyChanging();
this._organization_id = value;
this.SendPropertyChanged("organization_id");
this.Onorganization_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="VendorData_CapitalRequestBidData", Storage="_VendorData", ThisKey="vendor_id", OtherKey="vendor_id", IsForeignKey=true)]
public VendorData VendorData
{
get
{
return this._VendorData.Entity;
}
set
{
VendorData previousValue = this._VendorData.Entity;
if (((previousValue != value)
|| (this._VendorData.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._VendorData.Entity = null;
previousValue.CapitalRequestBidDatas.Remove(this);
}
this._VendorData.Entity = value;
if ((value != null))
{
value.CapitalRequestBidDatas.Add(this);
this._vendor_id = value.vendor_id;
}
else
{
this._vendor_id = default(Nullable<int>);
}
this.SendPropertyChanged("VendorData");
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="CapitalRequestData_CapitalRequestBidData", Storage="_CapitalRequestData", ThisKey="capital_request_id", OtherKey="capital_request_id", IsForeignKey=true, DeleteOnNull=true, DeleteRule="CASCADE")]
public CapitalRequestData CapitalRequestData
{
get
{
return this._CapitalRequestData.Entity;
}
set
{
CapitalRequestData previousValue = this._CapitalRequestData.Entity;
if (((previousValue != value)
|| (this._CapitalRequestData.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._CapitalRequestData.Entity = null;
previousValue.CapitalRequestBidDatas.Remove(this);
}
this._CapitalRequestData.Entity = value;
if ((value != null))
{
value.CapitalRequestBidDatas.Add(this);
this._capital_request_id = value.capital_request_id;
}
else
{
this._capital_request_id = default(int);
}
this.SendPropertyChanged("CapitalRequestData");
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo._org_secc_Purchasing_Approval")]
public partial class ApprovalData : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _approval_id;
private string _object_type_name;
private int _identifier;
private System.Nullable<int> _approver_id;
private int _approval_status_luid;
private System.Nullable<System.DateTime> _date_approved;
private System.Nullable<System.DateTime> _date_notified;
private string _created_by;
private string _modified_by;
private System.DateTime _date_created;
private System.DateTime _date_modified;
private bool _active;
private int _organization_id;
private int _approval_type_luid;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void Onapproval_idChanging(int value);
partial void Onapproval_idChanged();
partial void Onobject_type_nameChanging(string value);
partial void Onobject_type_nameChanged();
partial void OnidentifierChanging(int value);
partial void OnidentifierChanged();
partial void Onapprover_idChanging(System.Nullable<int> value);
partial void Onapprover_idChanged();
partial void Onapproval_status_luidChanging(int value);
partial void Onapproval_status_luidChanged();
partial void Ondate_approvedChanging(System.Nullable<System.DateTime> value);
partial void Ondate_approvedChanged();
partial void Ondate_notifiedChanging(System.Nullable<System.DateTime> value);
partial void Ondate_notifiedChanged();
partial void Oncreated_byChanging(string value);
partial void Oncreated_byChanged();
partial void Onmodified_byChanging(string value);
partial void Onmodified_byChanged();
partial void Ondate_createdChanging(System.DateTime value);
partial void Ondate_createdChanged();
partial void Ondate_modifiedChanging(System.DateTime value);
partial void Ondate_modifiedChanged();
partial void OnactiveChanging(bool value);
partial void OnactiveChanged();
partial void Onorganization_idChanging(int value);
partial void Onorganization_idChanged();
partial void Onapproval_type_luidChanging(int value);
partial void Onapproval_type_luidChanged();
#endregion
public ApprovalData()
{
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_approval_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
public int approval_id
{
get
{
return this._approval_id;
}
set
{
if ((this._approval_id != value))
{
this.Onapproval_idChanging(value);
this.SendPropertyChanging();
this._approval_id = value;
this.SendPropertyChanged("approval_id");
this.Onapproval_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_object_type_name", DbType="VarChar(400) NOT NULL", CanBeNull=false)]
public string object_type_name
{
get
{
return this._object_type_name;
}
set
{
if ((this._object_type_name != value))
{
this.Onobject_type_nameChanging(value);
this.SendPropertyChanging();
this._object_type_name = value;
this.SendPropertyChanged("object_type_name");
this.Onobject_type_nameChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_identifier", DbType="Int NOT NULL")]
public int identifier
{
get
{
return this._identifier;
}
set
{
if ((this._identifier != value))
{
this.OnidentifierChanging(value);
this.SendPropertyChanging();
this._identifier = value;
this.SendPropertyChanged("identifier");
this.OnidentifierChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_approver_id", DbType="Int")]
public System.Nullable<int> approver_id
{
get
{
return this._approver_id;
}
set
{
if ((this._approver_id != value))
{
this.Onapprover_idChanging(value);
this.SendPropertyChanging();
this._approver_id = value;
this.SendPropertyChanged("approver_id");
this.Onapprover_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_approval_status_luid", DbType="Int NOT NULL")]
public int approval_status_luid
{
get
{
return this._approval_status_luid;
}
set
{
if ((this._approval_status_luid != value))
{
this.Onapproval_status_luidChanging(value);
this.SendPropertyChanging();
this._approval_status_luid = value;
this.SendPropertyChanged("approval_status_luid");
this.Onapproval_status_luidChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_approved", DbType="DateTime")]
public System.Nullable<System.DateTime> date_approved
{
get
{
return this._date_approved;
}
set
{
if ((this._date_approved != value))
{
this.Ondate_approvedChanging(value);
this.SendPropertyChanging();
this._date_approved = value;
this.SendPropertyChanged("date_approved");
this.Ondate_approvedChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_notified", DbType="DateTime")]
public System.Nullable<System.DateTime> date_notified
{
get
{
return this._date_notified;
}
set
{
if ((this._date_notified != value))
{
this.Ondate_notifiedChanging(value);
this.SendPropertyChanging();
this._date_notified = value;
this.SendPropertyChanged("date_notified");
this.Ondate_notifiedChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_created_by", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
public string created_by
{
get
{
return this._created_by;
}
set
{
if ((this._created_by != value))
{
this.Oncreated_byChanging(value);
this.SendPropertyChanging();
this._created_by = value;
this.SendPropertyChanged("created_by");
this.Oncreated_byChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_modified_by", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
public string modified_by
{
get
{
return this._modified_by;
}
set
{
if ((this._modified_by != value))
{
this.Onmodified_byChanging(value);
this.SendPropertyChanging();
this._modified_by = value;
this.SendPropertyChanged("modified_by");
this.Onmodified_byChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_created", DbType="DateTime NOT NULL")]
public System.DateTime date_created
{
get
{
return this._date_created;
}
set
{
if ((this._date_created != value))
{
this.Ondate_createdChanging(value);
this.SendPropertyChanging();
this._date_created = value;
this.SendPropertyChanged("date_created");
this.Ondate_createdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_modified", DbType="DateTime NOT NULL")]
public System.DateTime date_modified
{
get
{
return this._date_modified;
}
set
{
if ((this._date_modified != value))
{
this.Ondate_modifiedChanging(value);
this.SendPropertyChanging();
this._date_modified = value;
this.SendPropertyChanged("date_modified");
this.Ondate_modifiedChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_active", DbType="Bit NOT NULL")]
public bool active
{
get
{
return this._active;
}
set
{
if ((this._active != value))
{
this.OnactiveChanging(value);
this.SendPropertyChanging();
this._active = value;
this.SendPropertyChanged("active");
this.OnactiveChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_organization_id", DbType="Int NOT NULL")]
public int organization_id
{
get
{
return this._organization_id;
}
set
{
if ((this._organization_id != value))
{
this.Onorganization_idChanging(value);
this.SendPropertyChanging();
this._organization_id = value;
this.SendPropertyChanged("organization_id");
this.Onorganization_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_approval_type_luid", DbType="Int NOT NULL")]
public int approval_type_luid
{
get
{
return this._approval_type_luid;
}
set
{
if ((this._approval_type_luid != value))
{
this.Onapproval_type_luidChanging(value);
this.SendPropertyChanging();
this._approval_type_luid = value;
this.SendPropertyChanged("approval_type_luid");
this.Onapproval_type_luidChanged();
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo._org_secc_Purchasing_CapitalRequest")]
public partial class CapitalRequestData : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _capital_request_id;
private string _project_name;
private string _project_description;
private System.Nullable<System.DateTime> _requested_on;
private int _status_luid;
private int _requester_id;
private int _ministry_luid;
private System.Nullable<decimal> _purchase_cost;
private System.Nullable<decimal> _install_train_cost;
private System.Nullable<decimal> _ongoing_maintenance_cost;
private string _item_location;
private System.Nullable<System.DateTime> _anticipated_inservice_date;
private System.Nullable<int> _gl_company_id;
private System.Nullable<int> _gl_fund_id;
private System.Nullable<int> _gl_department_id;
private System.Nullable<int> _gl_account_id;
private string _created_by;
private string _modified_by;
private System.DateTime _date_created;
private System.DateTime _date_modified;
private bool _active;
private int _organization_id;
private System.Nullable<System.DateTime> _gl_fiscal_year_start;
private System.Nullable<int> _location_luid;
private EntitySet<RequisitionData> _RequisitionDatas;
private EntitySet<CapitalRequestBidData> _CapitalRequestBidDatas;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void Oncapital_request_idChanging(int value);
partial void Oncapital_request_idChanged();
partial void Onproject_nameChanging(string value);
partial void Onproject_nameChanged();
partial void Onproject_descriptionChanging(string value);
partial void Onproject_descriptionChanged();
partial void Onrequested_onChanging(System.Nullable<System.DateTime> value);
partial void Onrequested_onChanged();
partial void Onstatus_luidChanging(int value);
partial void Onstatus_luidChanged();
partial void Onrequester_idChanging(int value);
partial void Onrequester_idChanged();
partial void Onministry_luidChanging(int value);
partial void Onministry_luidChanged();
partial void Onpurchase_costChanging(System.Nullable<decimal> value);
partial void Onpurchase_costChanged();
partial void Oninstall_train_costChanging(System.Nullable<decimal> value);
partial void Oninstall_train_costChanged();
partial void Onongoing_maintenance_costChanging(System.Nullable<decimal> value);
partial void Onongoing_maintenance_costChanged();
partial void Onitem_locationChanging(string value);
partial void Onitem_locationChanged();
partial void Onanticipated_inservice_dateChanging(System.Nullable<System.DateTime> value);
partial void Onanticipated_inservice_dateChanged();
partial void Ongl_company_idChanging(System.Nullable<int> value);
partial void Ongl_company_idChanged();
partial void Ongl_fund_idChanging(System.Nullable<int> value);
partial void Ongl_fund_idChanged();
partial void Ongl_department_idChanging(System.Nullable<int> value);
partial void Ongl_department_idChanged();
partial void Ongl_account_idChanging(System.Nullable<int> value);
partial void Ongl_account_idChanged();
partial void Oncreated_byChanging(string value);
partial void Oncreated_byChanged();
partial void Onmodified_byChanging(string value);
partial void Onmodified_byChanged();
partial void Ondate_createdChanging(System.DateTime value);
partial void Ondate_createdChanged();
partial void Ondate_modifiedChanging(System.DateTime value);
partial void Ondate_modifiedChanged();
partial void OnactiveChanging(bool value);
partial void OnactiveChanged();
partial void Onorganization_idChanging(int value);
partial void Onorganization_idChanged();
partial void Ongl_fiscal_year_startChanging(System.Nullable<System.DateTime> value);
partial void Ongl_fiscal_year_startChanged();
partial void Onlocation_luidChanging(System.Nullable<int> value);
partial void Onlocation_luidChanged();
#endregion
public CapitalRequestData()
{
this._RequisitionDatas = new EntitySet<RequisitionData>(new Action<RequisitionData>(this.attach_RequisitionDatas), new Action<RequisitionData>(this.detach_RequisitionDatas));
this._CapitalRequestBidDatas = new EntitySet<CapitalRequestBidData>(new Action<CapitalRequestBidData>(this.attach_CapitalRequestBidDatas), new Action<CapitalRequestBidData>(this.detach_CapitalRequestBidDatas));
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_capital_request_id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
public int capital_request_id
{
get
{
return this._capital_request_id;
}
set
{
if ((this._capital_request_id != value))
{
this.Oncapital_request_idChanging(value);
this.SendPropertyChanging();
this._capital_request_id = value;
this.SendPropertyChanged("capital_request_id");
this.Oncapital_request_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_project_name", DbType="VarChar(250) NOT NULL", CanBeNull=false)]
public string project_name
{
get
{
return this._project_name;
}
set
{
if ((this._project_name != value))
{
this.Onproject_nameChanging(value);
this.SendPropertyChanging();
this._project_name = value;
this.SendPropertyChanged("project_name");
this.Onproject_nameChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_project_description", DbType="VarChar(MAX)")]
public string project_description
{
get
{
return this._project_description;
}
set
{
if ((this._project_description != value))
{
this.Onproject_descriptionChanging(value);
this.SendPropertyChanging();
this._project_description = value;
this.SendPropertyChanged("project_description");
this.Onproject_descriptionChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_requested_on", DbType="DateTime")]
public System.Nullable<System.DateTime> requested_on
{
get
{
return this._requested_on;
}
set
{
if ((this._requested_on != value))
{
this.Onrequested_onChanging(value);
this.SendPropertyChanging();
this._requested_on = value;
this.SendPropertyChanged("requested_on");
this.Onrequested_onChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_status_luid", DbType="Int NOT NULL")]
public int status_luid
{
get
{
return this._status_luid;
}
set
{
if ((this._status_luid != value))
{
this.Onstatus_luidChanging(value);
this.SendPropertyChanging();
this._status_luid = value;
this.SendPropertyChanged("status_luid");
this.Onstatus_luidChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_requester_id", DbType="Int NOT NULL")]
public int requester_id
{
get
{
return this._requester_id;
}
set
{
if ((this._requester_id != value))
{
this.Onrequester_idChanging(value);
this.SendPropertyChanging();
this._requester_id = value;
this.SendPropertyChanged("requester_id");
this.Onrequester_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ministry_luid", DbType="Int NOT NULL")]
public int ministry_luid
{
get
{
return this._ministry_luid;
}
set
{
if ((this._ministry_luid != value))
{
this.Onministry_luidChanging(value);
this.SendPropertyChanging();
this._ministry_luid = value;
this.SendPropertyChanged("ministry_luid");
this.Onministry_luidChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_purchase_cost", DbType="Decimal(10,2)")]
public System.Nullable<decimal> purchase_cost
{
get
{
return this._purchase_cost;
}
set
{
if ((this._purchase_cost != value))
{
this.Onpurchase_costChanging(value);
this.SendPropertyChanging();
this._purchase_cost = value;
this.SendPropertyChanged("purchase_cost");
this.Onpurchase_costChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_install_train_cost", DbType="Decimal(10,2)")]
public System.Nullable<decimal> install_train_cost
{
get
{
return this._install_train_cost;
}
set
{
if ((this._install_train_cost != value))
{
this.Oninstall_train_costChanging(value);
this.SendPropertyChanging();
this._install_train_cost = value;
this.SendPropertyChanged("install_train_cost");
this.Oninstall_train_costChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ongoing_maintenance_cost", DbType="Decimal(10,2)")]
public System.Nullable<decimal> ongoing_maintenance_cost
{
get
{
return this._ongoing_maintenance_cost;
}
set
{
if ((this._ongoing_maintenance_cost != value))
{
this.Onongoing_maintenance_costChanging(value);
this.SendPropertyChanging();
this._ongoing_maintenance_cost = value;
this.SendPropertyChanged("ongoing_maintenance_cost");
this.Onongoing_maintenance_costChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_item_location", DbType="VarChar(250)")]
public string item_location
{
get
{
return this._item_location;
}
set
{
if ((this._item_location != value))
{
this.Onitem_locationChanging(value);
this.SendPropertyChanging();
this._item_location = value;
this.SendPropertyChanged("item_location");
this.Onitem_locationChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_anticipated_inservice_date", DbType="DateTime")]
public System.Nullable<System.DateTime> anticipated_inservice_date
{
get
{
return this._anticipated_inservice_date;
}
set
{
if ((this._anticipated_inservice_date != value))
{
this.Onanticipated_inservice_dateChanging(value);
this.SendPropertyChanging();
this._anticipated_inservice_date = value;
this.SendPropertyChanged("anticipated_inservice_date");
this.Onanticipated_inservice_dateChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_gl_company_id", DbType="Int")]
public System.Nullable<int> gl_company_id
{
get
{
return this._gl_company_id;
}
set
{
if ((this._gl_company_id != value))
{
this.Ongl_company_idChanging(value);
this.SendPropertyChanging();
this._gl_company_id = value;
this.SendPropertyChanged("gl_company_id");
this.Ongl_company_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_gl_fund_id", DbType="Int")]
public System.Nullable<int> gl_fund_id
{
get
{
return this._gl_fund_id;
}
set
{
if ((this._gl_fund_id != value))
{
this.Ongl_fund_idChanging(value);
this.SendPropertyChanging();
this._gl_fund_id = value;
this.SendPropertyChanged("gl_fund_id");
this.Ongl_fund_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_gl_department_id", DbType="Int")]
public System.Nullable<int> gl_department_id
{
get
{
return this._gl_department_id;
}
set
{
if ((this._gl_department_id != value))
{
this.Ongl_department_idChanging(value);
this.SendPropertyChanging();
this._gl_department_id = value;
this.SendPropertyChanged("gl_department_id");
this.Ongl_department_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_gl_account_id", DbType="Int")]
public System.Nullable<int> gl_account_id
{
get
{
return this._gl_account_id;
}
set
{
if ((this._gl_account_id != value))
{
this.Ongl_account_idChanging(value);
this.SendPropertyChanging();
this._gl_account_id = value;
this.SendPropertyChanged("gl_account_id");
this.Ongl_account_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_created_by", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
public string created_by
{
get
{
return this._created_by;
}
set
{
if ((this._created_by != value))
{
this.Oncreated_byChanging(value);
this.SendPropertyChanging();
this._created_by = value;
this.SendPropertyChanged("created_by");
this.Oncreated_byChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_modified_by", DbType="VarChar(50) NOT NULL", CanBeNull=false)]
public string modified_by
{
get
{
return this._modified_by;
}
set
{
if ((this._modified_by != value))
{
this.Onmodified_byChanging(value);
this.SendPropertyChanging();
this._modified_by = value;
this.SendPropertyChanged("modified_by");
this.Onmodified_byChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_created", DbType="DateTime NOT NULL")]
public System.DateTime date_created
{
get
{
return this._date_created;
}
set
{
if ((this._date_created != value))
{
this.Ondate_createdChanging(value);
this.SendPropertyChanging();
this._date_created = value;
this.SendPropertyChanged("date_created");
this.Ondate_createdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_date_modified", DbType="DateTime NOT NULL")]
public System.DateTime date_modified
{
get
{
return this._date_modified;
}
set
{
if ((this._date_modified != value))
{
this.Ondate_modifiedChanging(value);
this.SendPropertyChanging();
this._date_modified = value;
this.SendPropertyChanged("date_modified");
this.Ondate_modifiedChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_active", DbType="Bit NOT NULL")]
public bool active
{
get
{
return this._active;
}
set
{
if ((this._active != value))
{
this.OnactiveChanging(value);
this.SendPropertyChanging();
this._active = value;
this.SendPropertyChanged("active");
this.OnactiveChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_organization_id", DbType="Int NOT NULL")]
public int organization_id
{
get
{
return this._organization_id;
}
set
{
if ((this._organization_id != value))
{
this.Onorganization_idChanging(value);
this.SendPropertyChanging();
this._organization_id = value;
this.SendPropertyChanged("organization_id");
this.Onorganization_idChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_gl_fiscal_year_start", DbType="DateTime")]
public System.Nullable<System.DateTime> gl_fiscal_year_start
{
get
{
return this._gl_fiscal_year_start;
}
set
{
if ((this._gl_fiscal_year_start != value))
{
this.Ongl_fiscal_year_startChanging(value);
this.SendPropertyChanging();
this._gl_fiscal_year_start = value;
this.SendPropertyChanged("gl_fiscal_year_start");
this.Ongl_fiscal_year_startChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_location_luid", DbType="Int")]
public System.Nullable<int> location_luid
{
get
{
return this._location_luid;
}
set
{
if ((this._location_luid != value))
{
this.Onlocation_luidChanging(value);
this.SendPropertyChanging();
this._location_luid = value;
this.SendPropertyChanged("location_luid");
this.Onlocation_luidChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="CapitalRequestData_RequisitionData", Storage="_RequisitionDatas", ThisKey="capital_request_id", OtherKey="capital_request_id")]
public EntitySet<RequisitionData> RequisitionDatas
{
get
{
return this._RequisitionDatas;
}
set
{
this._RequisitionDatas.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="CapitalRequestData_CapitalRequestBidData", Storage="_CapitalRequestBidDatas", ThisKey="capital_request_id", OtherKey="capital_request_id")]
public EntitySet<CapitalRequestBidData> CapitalRequestBidDatas
{
get
{
return this._CapitalRequestBidDatas;
}
set
{
this._CapitalRequestBidDatas.Assign(value);
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
private void attach_RequisitionDatas(RequisitionData entity)
{
this.SendPropertyChanging();
entity.CapitalRequestData = this;
}
private void detach_RequisitionDatas(RequisitionData entity)
{
this.SendPropertyChanging();
entity.CapitalRequestData = null;
}
private void attach_CapitalRequestBidDatas(CapitalRequestBidData entity)
{
this.SendPropertyChanging();
entity.CapitalRequestData = this;
}
private void detach_CapitalRequestBidDatas(CapitalRequestBidData entity)
{
this.SendPropertyChanging();
entity.CapitalRequestData = null;
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Person")]
public partial class PersonData : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _Id;
private bool _IsSystem;
private System.Nullable<int> _RecordTypeValueId;
private System.Nullable<int> _RecordStatusValueId;
private System.Nullable<int> _RecordStatusReasonValueId;
private System.Nullable<int> _ConnectionStatusValueId;
private bool _IsDeceased;
private System.Nullable<int> _TitleValueId;
private string _FirstName;
private string _NickName;
private string _MiddleName;
private string _LastName;
private System.Nullable<int> _SuffixValueId;
private System.Nullable<int> _PhotoId;
private System.Nullable<int> _BirthDay;
private System.Nullable<int> _BirthMonth;
private System.Nullable<int> _BirthYear;
private int _Gender;
private System.Nullable<int> _MaritalStatusValueId;
private System.Nullable<System.DateTime> _AnniversaryDate;
private System.Nullable<int> _GivingGroupId;
private string _Email;
private bool _IsEmailActive;
private string _EmailNote;
private string _SystemNote;
private System.Nullable<int> _ViewedCount;
private System.Guid _Guid;
private System.Nullable<System.DateTime> _CreatedDateTime;
private System.Nullable<System.DateTime> _ModifiedDateTime;
private System.Nullable<int> _CreatedByPersonAliasId;
private System.Nullable<int> _ModifiedByPersonAliasId;
private int _EmailPreference;
private string _InactiveReasonNote;
private string _ForeignKey;
private System.Nullable<int> _ReviewReasonValueId;
private string _ReviewReasonNote;
private System.Nullable<int> _GraduationYear;
private System.Nullable<System.DateTime> _BirthDate;
private string _GivingId;
private System.Nullable<int> _DaysUntilBirthday;
private System.Nullable<System.Guid> _ForeignGuid;
private System.Nullable<int> _ForeignId;
private System.Nullable<int> _GivingLeaderId;
private System.Nullable<System.DateTime> _RecordStatusLastModifiedDateTime;
private EntitySet<PersonAliasData> _PersonAliasDatas;
private EntityRef<LookupData> _DefinedValue;
private EntityRef<LookupData> _DefinedValue1;
private EntityRef<LookupData> _DefinedValue2;
private EntityRef<LookupData> _DefinedValue3;
private EntityRef<LookupData> _DefinedValue4;
private EntityRef<LookupData> _DefinedValue5;
private EntityRef<LookupData> _DefinedValue6;
private EntityRef<LookupData> _LookupData;
private EntityRef<PersonAliasData> _PersonAlia;
private EntityRef<PersonAliasData> _PersonAlia1;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnIdChanging(int value);
partial void OnIdChanged();
partial void OnIsSystemChanging(bool value);
partial void OnIsSystemChanged();
partial void OnRecordTypeValueIdChanging(System.Nullable<int> value);
partial void OnRecordTypeValueIdChanged();
partial void OnRecordStatusValueIdChanging(System.Nullable<int> value);
partial void OnRecordStatusValueIdChanged();
partial void OnRecordStatusReasonValueIdChanging(System.Nullable<int> value);
partial void OnRecordStatusReasonValueIdChanged();
partial void OnConnectionStatusValueIdChanging(System.Nullable<int> value);
partial void OnConnectionStatusValueIdChanged();
partial void OnIsDeceasedChanging(bool value);
partial void OnIsDeceasedChanged();
partial void OnTitleValueIdChanging(System.Nullable<int> value);
partial void OnTitleValueIdChanged();
partial void OnFirstNameChanging(string value);
partial void OnFirstNameChanged();
partial void OnNickNameChanging(string value);
partial void OnNickNameChanged();
partial void OnMiddleNameChanging(string value);
partial void OnMiddleNameChanged();
partial void OnLastNameChanging(string value);
partial void OnLastNameChanged();
partial void OnSuffixValueIdChanging(System.Nullable<int> value);
partial void OnSuffixValueIdChanged();
partial void OnPhotoIdChanging(System.Nullable<int> value);
partial void OnPhotoIdChanged();
partial void OnBirthDayChanging(System.Nullable<int> value);
partial void OnBirthDayChanged();
partial void OnBirthMonthChanging(System.Nullable<int> value);
partial void OnBirthMonthChanged();
partial void OnBirthYearChanging(System.Nullable<int> value);
partial void OnBirthYearChanged();
partial void OnGenderChanging(int value);
partial void OnGenderChanged();
partial void OnMaritalStatusValueIdChanging(System.Nullable<int> value);
partial void OnMaritalStatusValueIdChanged();
partial void OnAnniversaryDateChanging(System.Nullable<System.DateTime> value);
partial void OnAnniversaryDateChanged();
partial void OnGivingGroupIdChanging(System.Nullable<int> value);
partial void OnGivingGroupIdChanged();
partial void OnEmailChanging(string value);
partial void OnEmailChanged();
partial void OnIsEmailActiveChanging(bool value);
partial void OnIsEmailActiveChanged();
partial void OnEmailNoteChanging(string value);
partial void OnEmailNoteChanged();
partial void OnSystemNoteChanging(string value);
partial void OnSystemNoteChanged();
partial void OnViewedCountChanging(System.Nullable<int> value);
partial void OnViewedCountChanged();
partial void OnGuidChanging(System.Guid value);
partial void OnGuidChanged();
partial void OnCreatedDateTimeChanging(System.Nullable<System.DateTime> value);
partial void OnCreatedDateTimeChanged();
partial void OnModifiedDateTimeChanging(System.Nullable<System.DateTime> value);
partial void OnModifiedDateTimeChanged();
partial void OnCreatedByPersonAliasIdChanging(System.Nullable<int> value);
partial void OnCreatedByPersonAliasIdChanged();
partial void OnModifiedByPersonAliasIdChanging(System.Nullable<int> value);
partial void OnModifiedByPersonAliasIdChanged();
partial void OnEmailPreferenceChanging(int value);
partial void OnEmailPreferenceChanged();
partial void OnInactiveReasonNoteChanging(string value);
partial void OnInactiveReasonNoteChanged();
partial void OnForeignKeyChanging(string value);
partial void OnForeignKeyChanged();
partial void OnReviewReasonValueIdChanging(System.Nullable<int> value);
partial void OnReviewReasonValueIdChanged();
partial void OnReviewReasonNoteChanging(string value);
partial void OnReviewReasonNoteChanged();
partial void OnGraduationYearChanging(System.Nullable<int> value);
partial void OnGraduationYearChanged();
partial void OnBirthDateChanging(System.Nullable<System.DateTime> value);
partial void OnBirthDateChanged();
partial void OnGivingIdChanging(string value);
partial void OnGivingIdChanged();
partial void OnDaysUntilBirthdayChanging(System.Nullable<int> value);
partial void OnDaysUntilBirthdayChanged();
partial void OnForeignGuidChanging(System.Nullable<System.Guid> value);
partial void OnForeignGuidChanged();
partial void OnForeignIdChanging(System.Nullable<int> value);
partial void OnForeignIdChanged();
partial void OnGivingLeaderIdChanging(System.Nullable<int> value);
partial void OnGivingLeaderIdChanged();
partial void OnRecordStatusLastModifiedDateTimeChanging(System.Nullable<System.DateTime> value);
partial void OnRecordStatusLastModifiedDateTimeChanged();
#endregion
public PersonData()
{
this._PersonAliasDatas = new EntitySet<PersonAliasData>(new Action<PersonAliasData>(this.attach_PersonAliasDatas), new Action<PersonAliasData>(this.detach_PersonAliasDatas));
this._DefinedValue = default(EntityRef<LookupData>);
this._DefinedValue1 = default(EntityRef<LookupData>);
this._DefinedValue2 = default(EntityRef<LookupData>);
this._DefinedValue3 = default(EntityRef<LookupData>);
this._DefinedValue4 = default(EntityRef<LookupData>);
this._DefinedValue5 = default(EntityRef<LookupData>);
this._DefinedValue6 = default(EntityRef<LookupData>);
this._LookupData = default(EntityRef<LookupData>);
this._PersonAlia = default(EntityRef<PersonAliasData>);
this._PersonAlia1 = default(EntityRef<PersonAliasData>);
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
public int Id
{
get
{
return this._Id;
}
set
{
if ((this._Id != value))
{
this.OnIdChanging(value);
this.SendPropertyChanging();
this._Id = value;
this.SendPropertyChanged("Id");
this.OnIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsSystem", DbType="Bit NOT NULL")]
public bool IsSystem
{
get
{
return this._IsSystem;
}
set
{
if ((this._IsSystem != value))
{
this.OnIsSystemChanging(value);
this.SendPropertyChanging();
this._IsSystem = value;
this.SendPropertyChanged("IsSystem");
this.OnIsSystemChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RecordTypeValueId", DbType="Int")]
public System.Nullable<int> RecordTypeValueId
{
get
{
return this._RecordTypeValueId;
}
set
{
if ((this._RecordTypeValueId != value))
{
if (this._DefinedValue4.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnRecordTypeValueIdChanging(value);
this.SendPropertyChanging();
this._RecordTypeValueId = value;
this.SendPropertyChanged("RecordTypeValueId");
this.OnRecordTypeValueIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RecordStatusValueId", DbType="Int")]
public System.Nullable<int> RecordStatusValueId
{
get
{
return this._RecordStatusValueId;
}
set
{
if ((this._RecordStatusValueId != value))
{
if (this._DefinedValue3.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnRecordStatusValueIdChanging(value);
this.SendPropertyChanging();
this._RecordStatusValueId = value;
this.SendPropertyChanged("RecordStatusValueId");
this.OnRecordStatusValueIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RecordStatusReasonValueId", DbType="Int")]
public System.Nullable<int> RecordStatusReasonValueId
{
get
{
return this._RecordStatusReasonValueId;
}
set
{
if ((this._RecordStatusReasonValueId != value))
{
if (this._DefinedValue2.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnRecordStatusReasonValueIdChanging(value);
this.SendPropertyChanging();
this._RecordStatusReasonValueId = value;
this.SendPropertyChanged("RecordStatusReasonValueId");
this.OnRecordStatusReasonValueIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConnectionStatusValueId", DbType="Int")]
public System.Nullable<int> ConnectionStatusValueId
{
get
{
return this._ConnectionStatusValueId;
}
set
{
if ((this._ConnectionStatusValueId != value))
{
if (this._DefinedValue1.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnConnectionStatusValueIdChanging(value);
this.SendPropertyChanging();
this._ConnectionStatusValueId = value;
this.SendPropertyChanged("ConnectionStatusValueId");
this.OnConnectionStatusValueIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsDeceased", DbType="Bit NOT NULL")]
public bool IsDeceased
{
get
{
return this._IsDeceased;
}
set
{
if ((this._IsDeceased != value))
{
this.OnIsDeceasedChanging(value);
this.SendPropertyChanging();
this._IsDeceased = value;
this.SendPropertyChanged("IsDeceased");
this.OnIsDeceasedChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TitleValueId", DbType="Int")]
public System.Nullable<int> TitleValueId
{
get
{
return this._TitleValueId;
}
set
{
if ((this._TitleValueId != value))
{
if (this._LookupData.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnTitleValueIdChanging(value);
this.SendPropertyChanging();
this._TitleValueId = value;
this.SendPropertyChanged("TitleValueId");
this.OnTitleValueIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FirstName", DbType="NVarChar(50)")]
public string FirstName
{
get
{
return this._FirstName;
}
set
{
if ((this._FirstName != value))
{
this.OnFirstNameChanging(value);
this.SendPropertyChanging();
this._FirstName = value;
this.SendPropertyChanged("FirstName");
this.OnFirstNameChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NickName", DbType="NVarChar(50)")]
public string NickName
{
get
{
return this._NickName;
}
set
{
if ((this._NickName != value))
{
this.OnNickNameChanging(value);
this.SendPropertyChanging();
this._NickName = value;
this.SendPropertyChanged("NickName");
this.OnNickNameChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MiddleName", DbType="NVarChar(50)")]
public string MiddleName
{
get
{
return this._MiddleName;
}
set
{
if ((this._MiddleName != value))
{
this.OnMiddleNameChanging(value);
this.SendPropertyChanging();
this._MiddleName = value;
this.SendPropertyChanged("MiddleName");
this.OnMiddleNameChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LastName", DbType="NVarChar(50)")]
public string LastName
{
get
{
return this._LastName;
}
set
{
if ((this._LastName != value))
{
this.OnLastNameChanging(value);
this.SendPropertyChanging();
this._LastName = value;
this.SendPropertyChanged("LastName");
this.OnLastNameChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SuffixValueId", DbType="Int")]
public System.Nullable<int> SuffixValueId
{
get
{
return this._SuffixValueId;
}
set
{
if ((this._SuffixValueId != value))
{
if (this._DefinedValue6.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnSuffixValueIdChanging(value);
this.SendPropertyChanging();
this._SuffixValueId = value;
this.SendPropertyChanged("SuffixValueId");
this.OnSuffixValueIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PhotoId", DbType="Int")]
public System.Nullable<int> PhotoId
{
get
{
return this._PhotoId;
}
set
{
if ((this._PhotoId != value))
{
this.OnPhotoIdChanging(value);
this.SendPropertyChanging();
this._PhotoId = value;
this.SendPropertyChanged("PhotoId");
this.OnPhotoIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BirthDay", DbType="Int")]
public System.Nullable<int> BirthDay
{
get
{
return this._BirthDay;
}
set
{
if ((this._BirthDay != value))
{
this.OnBirthDayChanging(value);
this.SendPropertyChanging();
this._BirthDay = value;
this.SendPropertyChanged("BirthDay");
this.OnBirthDayChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BirthMonth", DbType="Int")]
public System.Nullable<int> BirthMonth
{
get
{
return this._BirthMonth;
}
set
{
if ((this._BirthMonth != value))
{
this.OnBirthMonthChanging(value);
this.SendPropertyChanging();
this._BirthMonth = value;
this.SendPropertyChanged("BirthMonth");
this.OnBirthMonthChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BirthYear", DbType="Int")]
public System.Nullable<int> BirthYear
{
get
{
return this._BirthYear;
}
set
{
if ((this._BirthYear != value))
{
this.OnBirthYearChanging(value);
this.SendPropertyChanging();
this._BirthYear = value;
this.SendPropertyChanged("BirthYear");
this.OnBirthYearChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Gender", DbType="Int NOT NULL")]
public int Gender
{
get
{
return this._Gender;
}
set
{
if ((this._Gender != value))
{
this.OnGenderChanging(value);
this.SendPropertyChanging();
this._Gender = value;
this.SendPropertyChanged("Gender");
this.OnGenderChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaritalStatusValueId", DbType="Int")]
public System.Nullable<int> MaritalStatusValueId
{
get
{
return this._MaritalStatusValueId;
}
set
{
if ((this._MaritalStatusValueId != value))
{
if (this._DefinedValue.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnMaritalStatusValueIdChanging(value);
this.SendPropertyChanging();
this._MaritalStatusValueId = value;
this.SendPropertyChanged("MaritalStatusValueId");
this.OnMaritalStatusValueIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AnniversaryDate", DbType="Date")]
public System.Nullable<System.DateTime> AnniversaryDate
{
get
{
return this._AnniversaryDate;
}
set
{
if ((this._AnniversaryDate != value))
{
this.OnAnniversaryDateChanging(value);
this.SendPropertyChanging();
this._AnniversaryDate = value;
this.SendPropertyChanged("AnniversaryDate");
this.OnAnniversaryDateChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GivingGroupId", DbType="Int")]
public System.Nullable<int> GivingGroupId
{
get
{
return this._GivingGroupId;
}
set
{
if ((this._GivingGroupId != value))
{
this.OnGivingGroupIdChanging(value);
this.SendPropertyChanging();
this._GivingGroupId = value;
this.SendPropertyChanged("GivingGroupId");
this.OnGivingGroupIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Email", DbType="NVarChar(75)")]
public string Email
{
get
{
return this._Email;
}
set
{
if ((this._Email != value))
{
this.OnEmailChanging(value);
this.SendPropertyChanging();
this._Email = value;
this.SendPropertyChanged("Email");
this.OnEmailChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsEmailActive", DbType="Bit NOT NULL")]
public bool IsEmailActive
{
get
{
return this._IsEmailActive;
}
set
{
if ((this._IsEmailActive != value))
{
this.OnIsEmailActiveChanging(value);
this.SendPropertyChanging();
this._IsEmailActive = value;
this.SendPropertyChanged("IsEmailActive");
this.OnIsEmailActiveChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EmailNote", DbType="NVarChar(250)")]
public string EmailNote
{
get
{
return this._EmailNote;
}
set
{
if ((this._EmailNote != value))
{
this.OnEmailNoteChanging(value);
this.SendPropertyChanging();
this._EmailNote = value;
this.SendPropertyChanged("EmailNote");
this.OnEmailNoteChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SystemNote", DbType="NVarChar(1000)")]
public string SystemNote
{
get
{
return this._SystemNote;
}
set
{
if ((this._SystemNote != value))
{
this.OnSystemNoteChanging(value);
this.SendPropertyChanging();
this._SystemNote = value;
this.SendPropertyChanged("SystemNote");
this.OnSystemNoteChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ViewedCount", DbType="Int")]
public System.Nullable<int> ViewedCount
{
get
{
return this._ViewedCount;
}
set
{
if ((this._ViewedCount != value))
{
this.OnViewedCountChanging(value);
this.SendPropertyChanging();
this._ViewedCount = value;
this.SendPropertyChanged("ViewedCount");
this.OnViewedCountChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Guid", DbType="UniqueIdentifier NOT NULL")]
public System.Guid Guid
{
get
{
return this._Guid;
}
set
{
if ((this._Guid != value))
{
this.OnGuidChanging(value);
this.SendPropertyChanging();
this._Guid = value;
this.SendPropertyChanged("Guid");
this.OnGuidChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreatedDateTime", DbType="DateTime")]
public System.Nullable<System.DateTime> CreatedDateTime
{
get
{
return this._CreatedDateTime;
}
set
{
if ((this._CreatedDateTime != value))
{
this.OnCreatedDateTimeChanging(value);
this.SendPropertyChanging();
this._CreatedDateTime = value;
this.SendPropertyChanged("CreatedDateTime");
this.OnCreatedDateTimeChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ModifiedDateTime", DbType="DateTime")]
public System.Nullable<System.DateTime> ModifiedDateTime
{
get
{
return this._ModifiedDateTime;
}
set
{
if ((this._ModifiedDateTime != value))
{
this.OnModifiedDateTimeChanging(value);
this.SendPropertyChanging();
this._ModifiedDateTime = value;
this.SendPropertyChanged("ModifiedDateTime");
this.OnModifiedDateTimeChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreatedByPersonAliasId", DbType="Int")]
public System.Nullable<int> CreatedByPersonAliasId
{
get
{
return this._CreatedByPersonAliasId;
}
set
{
if ((this._CreatedByPersonAliasId != value))
{
if (this._PersonAlia.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnCreatedByPersonAliasIdChanging(value);
this.SendPropertyChanging();
this._CreatedByPersonAliasId = value;
this.SendPropertyChanged("CreatedByPersonAliasId");
this.OnCreatedByPersonAliasIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ModifiedByPersonAliasId", DbType="Int")]
public System.Nullable<int> ModifiedByPersonAliasId
{
get
{
return this._ModifiedByPersonAliasId;
}
set
{
if ((this._ModifiedByPersonAliasId != value))
{
if (this._PersonAlia1.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnModifiedByPersonAliasIdChanging(value);
this.SendPropertyChanging();
this._ModifiedByPersonAliasId = value;
this.SendPropertyChanged("ModifiedByPersonAliasId");
this.OnModifiedByPersonAliasIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EmailPreference", DbType="Int NOT NULL")]
public int EmailPreference
{
get
{
return this._EmailPreference;
}
set
{
if ((this._EmailPreference != value))
{
this.OnEmailPreferenceChanging(value);
this.SendPropertyChanging();
this._EmailPreference = value;
this.SendPropertyChanged("EmailPreference");
this.OnEmailPreferenceChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InactiveReasonNote", DbType="NVarChar(1000)")]
public string InactiveReasonNote
{
get
{
return this._InactiveReasonNote;
}
set
{
if ((this._InactiveReasonNote != value))
{
this.OnInactiveReasonNoteChanging(value);
this.SendPropertyChanging();
this._InactiveReasonNote = value;
this.SendPropertyChanged("InactiveReasonNote");
this.OnInactiveReasonNoteChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ForeignKey", DbType="NVarChar(100)")]
public string ForeignKey
{
get
{
return this._ForeignKey;
}
set
{
if ((this._ForeignKey != value))
{
this.OnForeignKeyChanging(value);
this.SendPropertyChanging();
this._ForeignKey = value;
this.SendPropertyChanged("ForeignKey");
this.OnForeignKeyChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReviewReasonValueId", DbType="Int")]
public System.Nullable<int> ReviewReasonValueId
{
get
{
return this._ReviewReasonValueId;
}
set
{
if ((this._ReviewReasonValueId != value))
{
if (this._DefinedValue5.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnReviewReasonValueIdChanging(value);
this.SendPropertyChanging();
this._ReviewReasonValueId = value;
this.SendPropertyChanged("ReviewReasonValueId");
this.OnReviewReasonValueIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReviewReasonNote", DbType="NVarChar(1000)")]
public string ReviewReasonNote
{
get
{
return this._ReviewReasonNote;
}
set
{
if ((this._ReviewReasonNote != value))
{
this.OnReviewReasonNoteChanging(value);
this.SendPropertyChanging();
this._ReviewReasonNote = value;
this.SendPropertyChanged("ReviewReasonNote");
this.OnReviewReasonNoteChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GraduationYear", DbType="Int")]
public System.Nullable<int> GraduationYear
{
get
{
return this._GraduationYear;
}
set
{
if ((this._GraduationYear != value))
{
this.OnGraduationYearChanging(value);
this.SendPropertyChanging();
this._GraduationYear = value;
this.SendPropertyChanged("GraduationYear");
this.OnGraduationYearChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BirthDate", AutoSync=AutoSync.Always, DbType="Date", IsDbGenerated=true, UpdateCheck=UpdateCheck.Never)]
public System.Nullable<System.DateTime> BirthDate
{
get
{
return this._BirthDate;
}
set
{
if ((this._BirthDate != value))
{
this.OnBirthDateChanging(value);
this.SendPropertyChanging();
this._BirthDate = value;
this.SendPropertyChanged("BirthDate");
this.OnBirthDateChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GivingId", AutoSync=AutoSync.Always, DbType="VarChar(31)", IsDbGenerated=true, UpdateCheck=UpdateCheck.Never)]
public string GivingId
{
get
{
return this._GivingId;
}
set
{
if ((this._GivingId != value))
{
this.OnGivingIdChanging(value);
this.SendPropertyChanging();
this._GivingId = value;
this.SendPropertyChanged("GivingId");
this.OnGivingIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DaysUntilBirthday", AutoSync=AutoSync.Always, DbType="Int", IsDbGenerated=true, UpdateCheck=UpdateCheck.Never)]
public System.Nullable<int> DaysUntilBirthday
{
get
{
return this._DaysUntilBirthday;
}
set
{
if ((this._DaysUntilBirthday != value))
{
this.OnDaysUntilBirthdayChanging(value);
this.SendPropertyChanging();
this._DaysUntilBirthday = value;
this.SendPropertyChanged("DaysUntilBirthday");
this.OnDaysUntilBirthdayChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ForeignGuid", DbType="UniqueIdentifier")]
public System.Nullable<System.Guid> ForeignGuid
{
get
{
return this._ForeignGuid;
}
set
{
if ((this._ForeignGuid != value))
{
this.OnForeignGuidChanging(value);
this.SendPropertyChanging();
this._ForeignGuid = value;
this.SendPropertyChanged("ForeignGuid");
this.OnForeignGuidChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ForeignId", DbType="Int")]
public System.Nullable<int> ForeignId
{
get
{
return this._ForeignId;
}
set
{
if ((this._ForeignId != value))
{
this.OnForeignIdChanging(value);
this.SendPropertyChanging();
this._ForeignId = value;
this.SendPropertyChanged("ForeignId");
this.OnForeignIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GivingLeaderId", AutoSync=AutoSync.Always, DbType="Int", IsDbGenerated=true, UpdateCheck=UpdateCheck.Never)]
public System.Nullable<int> GivingLeaderId
{
get
{
return this._GivingLeaderId;
}
set
{
if ((this._GivingLeaderId != value))
{
this.OnGivingLeaderIdChanging(value);
this.SendPropertyChanging();
this._GivingLeaderId = value;
this.SendPropertyChanged("GivingLeaderId");
this.OnGivingLeaderIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RecordStatusLastModifiedDateTime", DbType="DateTime")]
public System.Nullable<System.DateTime> RecordStatusLastModifiedDateTime
{
get
{
return this._RecordStatusLastModifiedDateTime;
}
set
{
if ((this._RecordStatusLastModifiedDateTime != value))
{
this.OnRecordStatusLastModifiedDateTimeChanging(value);
this.SendPropertyChanging();
this._RecordStatusLastModifiedDateTime = value;
this.SendPropertyChanged("RecordStatusLastModifiedDateTime");
this.OnRecordStatusLastModifiedDateTimeChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="PersonData_PersonAliasData", Storage="_PersonAliasDatas", ThisKey="Id", OtherKey="PersonId")]
public EntitySet<PersonAliasData> PersonAliasDatas
{
get
{
return this._PersonAliasDatas;
}
set
{
this._PersonAliasDatas.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="LookupData_PersonData", Storage="_DefinedValue", ThisKey="MaritalStatusValueId", OtherKey="Id", IsForeignKey=true)]
public LookupData DefinedValue
{
get
{
return this._DefinedValue.Entity;
}
set
{
LookupData previousValue = this._DefinedValue.Entity;
if (((previousValue != value)
|| (this._DefinedValue.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._DefinedValue.Entity = null;
previousValue.Persons.Remove(this);
}
this._DefinedValue.Entity = value;
if ((value != null))
{
value.Persons.Add(this);
this._MaritalStatusValueId = value.Id;
}
else
{
this._MaritalStatusValueId = default(Nullable<int>);
}
this.SendPropertyChanged("DefinedValue");
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="LookupData_PersonData1", Storage="_DefinedValue1", ThisKey="ConnectionStatusValueId", OtherKey="Id", IsForeignKey=true)]
public LookupData DefinedValue1
{
get
{
return this._DefinedValue1.Entity;
}
set
{
LookupData previousValue = this._DefinedValue1.Entity;
if (((previousValue != value)
|| (this._DefinedValue1.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._DefinedValue1.Entity = null;
previousValue.Persons1.Remove(this);
}
this._DefinedValue1.Entity = value;
if ((value != null))
{
value.Persons1.Add(this);
this._ConnectionStatusValueId = value.Id;
}
else
{
this._ConnectionStatusValueId = default(Nullable<int>);
}
this.SendPropertyChanged("DefinedValue1");
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="LookupData_PersonData2", Storage="_DefinedValue2", ThisKey="RecordStatusReasonValueId", OtherKey="Id", IsForeignKey=true)]
public LookupData DefinedValue2
{
get
{
return this._DefinedValue2.Entity;
}
set
{
LookupData previousValue = this._DefinedValue2.Entity;
if (((previousValue != value)
|| (this._DefinedValue2.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._DefinedValue2.Entity = null;
previousValue.Persons2.Remove(this);
}
this._DefinedValue2.Entity = value;
if ((value != null))
{
value.Persons2.Add(this);
this._RecordStatusReasonValueId = value.Id;
}
else
{
this._RecordStatusReasonValueId = default(Nullable<int>);
}
this.SendPropertyChanged("DefinedValue2");
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="LookupData_PersonData3", Storage="_DefinedValue3", ThisKey="RecordStatusValueId", OtherKey="Id", IsForeignKey=true)]
public LookupData DefinedValue3
{
get
{
return this._DefinedValue3.Entity;
}
set
{
LookupData previousValue = this._DefinedValue3.Entity;
if (((previousValue != value)
|| (this._DefinedValue3.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._DefinedValue3.Entity = null;
previousValue.Persons3.Remove(this);
}
this._DefinedValue3.Entity = value;
if ((value != null))
{
value.Persons3.Add(this);
this._RecordStatusValueId = value.Id;
}
else
{
this._RecordStatusValueId = default(Nullable<int>);
}
this.SendPropertyChanged("DefinedValue3");
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="LookupData_PersonData4", Storage="_DefinedValue4", ThisKey="RecordTypeValueId", OtherKey="Id", IsForeignKey=true)]
public LookupData DefinedValue4
{
get
{
return this._DefinedValue4.Entity;
}
set
{
LookupData previousValue = this._DefinedValue4.Entity;
if (((previousValue != value)
|| (this._DefinedValue4.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._DefinedValue4.Entity = null;
previousValue.Persons4.Remove(this);
}
this._DefinedValue4.Entity = value;
if ((value != null))
{
value.Persons4.Add(this);
this._RecordTypeValueId = value.Id;
}
else
{
this._RecordTypeValueId = default(Nullable<int>);
}
this.SendPropertyChanged("DefinedValue4");
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="LookupData_PersonData5", Storage="_DefinedValue5", ThisKey="ReviewReasonValueId", OtherKey="Id", IsForeignKey=true)]
public LookupData DefinedValue5
{
get
{
return this._DefinedValue5.Entity;
}
set
{
LookupData previousValue = this._DefinedValue5.Entity;
if (((previousValue != value)
|| (this._DefinedValue5.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._DefinedValue5.Entity = null;
previousValue.Persons5.Remove(this);
}
this._DefinedValue5.Entity = value;
if ((value != null))
{
value.Persons5.Add(this);
this._ReviewReasonValueId = value.Id;
}
else
{
this._ReviewReasonValueId = default(Nullable<int>);
}
this.SendPropertyChanged("DefinedValue5");
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="LookupData_PersonData6", Storage="_DefinedValue6", ThisKey="SuffixValueId", OtherKey="Id", IsForeignKey=true)]
public LookupData DefinedValue6
{
get
{
return this._DefinedValue6.Entity;
}
set
{
LookupData previousValue = this._DefinedValue6.Entity;
if (((previousValue != value)
|| (this._DefinedValue6.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._DefinedValue6.Entity = null;
previousValue.Persons6.Remove(this);
}
this._DefinedValue6.Entity = value;
if ((value != null))
{
value.Persons6.Add(this);
this._SuffixValueId = value.Id;
}
else
{
this._SuffixValueId = default(Nullable<int>);
}
this.SendPropertyChanged("DefinedValue6");
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="LookupData_PersonData7", Storage="_LookupData", ThisKey="TitleValueId", OtherKey="Id", IsForeignKey=true)]
public LookupData LookupData
{
get
{
return this._LookupData.Entity;
}
set
{
LookupData previousValue = this._LookupData.Entity;
if (((previousValue != value)
|| (this._LookupData.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._LookupData.Entity = null;
previousValue.PersonDatas.Remove(this);
}
this._LookupData.Entity = value;
if ((value != null))
{
value.PersonDatas.Add(this);
this._TitleValueId = value.Id;
}
else
{
this._TitleValueId = default(Nullable<int>);
}
this.SendPropertyChanged("LookupData");
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="PersonAliasData_PersonData", Storage="_PersonAlia", ThisKey="CreatedByPersonAliasId", OtherKey="Id", IsForeignKey=true)]
public PersonAliasData PersonAlia
{
get
{
return this._PersonAlia.Entity;
}
set
{
PersonAliasData previousValue = this._PersonAlia.Entity;
if (((previousValue != value)
|| (this._PersonAlia.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._PersonAlia.Entity = null;
previousValue.PersonDatas.Remove(this);
}
this._PersonAlia.Entity = value;
if ((value != null))
{
value.PersonDatas.Add(this);
this._CreatedByPersonAliasId = value.Id;
}
else
{
this._CreatedByPersonAliasId = default(Nullable<int>);
}
this.SendPropertyChanged("PersonAlia");
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="PersonAliasData_PersonData1", Storage="_PersonAlia1", ThisKey="ModifiedByPersonAliasId", OtherKey="Id", IsForeignKey=true)]
public PersonAliasData PersonAlia1
{
get
{
return this._PersonAlia1.Entity;
}
set
{
PersonAliasData previousValue = this._PersonAlia1.Entity;
if (((previousValue != value)
|| (this._PersonAlia1.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._PersonAlia1.Entity = null;
previousValue.PersonDatas1.Remove(this);
}
this._PersonAlia1.Entity = value;
if ((value != null))
{
value.PersonDatas1.Add(this);
this._ModifiedByPersonAliasId = value.Id;
}
else
{
this._ModifiedByPersonAliasId = default(Nullable<int>);
}
this.SendPropertyChanged("PersonAlia1");
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
private void attach_PersonAliasDatas(PersonAliasData entity)
{
this.SendPropertyChanging();
entity.PersonData = this;
}
private void detach_PersonAliasDatas(PersonAliasData entity)
{
this.SendPropertyChanging();
entity.PersonData = null;
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.DefinedValue")]
public partial class LookupData : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _Id;
private bool _IsSystem;
private int _DefinedTypeId;
private int _Order;
private string _Value;
private string _Description;
private System.Guid _Guid;
private System.Nullable<System.DateTime> _CreatedDateTime;
private System.Nullable<System.DateTime> _ModifiedDateTime;
private System.Nullable<int> _CreatedByPersonAliasId;
private System.Nullable<int> _ModifiedByPersonAliasId;
private string _ForeignKey;
private System.Nullable<System.Guid> _ForeignGuid;
private System.Nullable<int> _ForeignId;
private EntitySet<PersonData> _Persons;
private EntitySet<PersonData> _Persons1;
private EntitySet<PersonData> _Persons2;
private EntitySet<PersonData> _Persons3;
private EntitySet<PersonData> _Persons4;
private EntitySet<PersonData> _Persons5;
private EntitySet<PersonData> _Persons6;
private EntitySet<PersonData> _PersonDatas;
private EntityRef<PersonAliasData> _PersonAlia;
private EntityRef<PersonAliasData> _PersonAliasData;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnIdChanging(int value);
partial void OnIdChanged();
partial void OnIsSystemChanging(bool value);
partial void OnIsSystemChanged();
partial void OnDefinedTypeIdChanging(int value);
partial void OnDefinedTypeIdChanged();
partial void OnOrderChanging(int value);
partial void OnOrderChanged();
partial void OnValueChanging(string value);
partial void OnValueChanged();
partial void OnDescriptionChanging(string value);
partial void OnDescriptionChanged();
partial void OnGuidChanging(System.Guid value);
partial void OnGuidChanged();
partial void OnCreatedDateTimeChanging(System.Nullable<System.DateTime> value);
partial void OnCreatedDateTimeChanged();
partial void OnModifiedDateTimeChanging(System.Nullable<System.DateTime> value);
partial void OnModifiedDateTimeChanged();
partial void OnCreatedByPersonAliasIdChanging(System.Nullable<int> value);
partial void OnCreatedByPersonAliasIdChanged();
partial void OnModifiedByPersonAliasIdChanging(System.Nullable<int> value);
partial void OnModifiedByPersonAliasIdChanged();
partial void OnForeignKeyChanging(string value);
partial void OnForeignKeyChanged();
partial void OnForeignGuidChanging(System.Nullable<System.Guid> value);
partial void OnForeignGuidChanged();
partial void OnForeignIdChanging(System.Nullable<int> value);
partial void OnForeignIdChanged();
#endregion
public LookupData()
{
this._Persons = new EntitySet<PersonData>(new Action<PersonData>(this.attach_Persons), new Action<PersonData>(this.detach_Persons));
this._Persons1 = new EntitySet<PersonData>(new Action<PersonData>(this.attach_Persons1), new Action<PersonData>(this.detach_Persons1));
this._Persons2 = new EntitySet<PersonData>(new Action<PersonData>(this.attach_Persons2), new Action<PersonData>(this.detach_Persons2));
this._Persons3 = new EntitySet<PersonData>(new Action<PersonData>(this.attach_Persons3), new Action<PersonData>(this.detach_Persons3));
this._Persons4 = new EntitySet<PersonData>(new Action<PersonData>(this.attach_Persons4), new Action<PersonData>(this.detach_Persons4));
this._Persons5 = new EntitySet<PersonData>(new Action<PersonData>(this.attach_Persons5), new Action<PersonData>(this.detach_Persons5));
this._Persons6 = new EntitySet<PersonData>(new Action<PersonData>(this.attach_Persons6), new Action<PersonData>(this.detach_Persons6));
this._PersonDatas = new EntitySet<PersonData>(new Action<PersonData>(this.attach_PersonDatas), new Action<PersonData>(this.detach_PersonDatas));
this._PersonAlia = default(EntityRef<PersonAliasData>);
this._PersonAliasData = default(EntityRef<PersonAliasData>);
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
public int Id
{
get
{
return this._Id;
}
set
{
if ((this._Id != value))
{
this.OnIdChanging(value);
this.SendPropertyChanging();
this._Id = value;
this.SendPropertyChanged("Id");
this.OnIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsSystem", DbType="Bit NOT NULL")]
public bool IsSystem
{
get
{
return this._IsSystem;
}
set
{
if ((this._IsSystem != value))
{
this.OnIsSystemChanging(value);
this.SendPropertyChanging();
this._IsSystem = value;
this.SendPropertyChanged("IsSystem");
this.OnIsSystemChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DefinedTypeId", DbType="Int NOT NULL")]
public int DefinedTypeId
{
get
{
return this._DefinedTypeId;
}
set
{
if ((this._DefinedTypeId != value))
{
this.OnDefinedTypeIdChanging(value);
this.SendPropertyChanging();
this._DefinedTypeId = value;
this.SendPropertyChanged("DefinedTypeId");
this.OnDefinedTypeIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Name="[Order]", Storage="_Order", DbType="Int NOT NULL")]
public int Order
{
get
{
return this._Order;
}
set
{
if ((this._Order != value))
{
this.OnOrderChanging(value);
this.SendPropertyChanging();
this._Order = value;
this.SendPropertyChanged("Order");
this.OnOrderChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Value", DbType="NVarChar(250) NOT NULL", CanBeNull=false)]
public string Value
{
get
{
return this._Value;
}
set
{
if ((this._Value != value))
{
this.OnValueChanging(value);
this.SendPropertyChanging();
this._Value = value;
this.SendPropertyChanged("Value");
this.OnValueChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Description", DbType="NVarChar(MAX)")]
public string Description
{
get
{
return this._Description;
}
set
{
if ((this._Description != value))
{
this.OnDescriptionChanging(value);
this.SendPropertyChanging();
this._Description = value;
this.SendPropertyChanged("Description");
this.OnDescriptionChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Guid", DbType="UniqueIdentifier NOT NULL")]
public System.Guid Guid
{
get
{
return this._Guid;
}
set
{
if ((this._Guid != value))
{
this.OnGuidChanging(value);
this.SendPropertyChanging();
this._Guid = value;
this.SendPropertyChanged("Guid");
this.OnGuidChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreatedDateTime", DbType="DateTime")]
public System.Nullable<System.DateTime> CreatedDateTime
{
get
{
return this._CreatedDateTime;
}
set
{
if ((this._CreatedDateTime != value))
{
this.OnCreatedDateTimeChanging(value);
this.SendPropertyChanging();
this._CreatedDateTime = value;
this.SendPropertyChanged("CreatedDateTime");
this.OnCreatedDateTimeChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ModifiedDateTime", DbType="DateTime")]
public System.Nullable<System.DateTime> ModifiedDateTime
{
get
{
return this._ModifiedDateTime;
}
set
{
if ((this._ModifiedDateTime != value))
{
this.OnModifiedDateTimeChanging(value);
this.SendPropertyChanging();
this._ModifiedDateTime = value;
this.SendPropertyChanged("ModifiedDateTime");
this.OnModifiedDateTimeChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreatedByPersonAliasId", DbType="Int")]
public System.Nullable<int> CreatedByPersonAliasId
{
get
{
return this._CreatedByPersonAliasId;
}
set
{
if ((this._CreatedByPersonAliasId != value))
{
if (this._PersonAlia.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnCreatedByPersonAliasIdChanging(value);
this.SendPropertyChanging();
this._CreatedByPersonAliasId = value;
this.SendPropertyChanged("CreatedByPersonAliasId");
this.OnCreatedByPersonAliasIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ModifiedByPersonAliasId", DbType="Int")]
public System.Nullable<int> ModifiedByPersonAliasId
{
get
{
return this._ModifiedByPersonAliasId;
}
set
{
if ((this._ModifiedByPersonAliasId != value))
{
if (this._PersonAliasData.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnModifiedByPersonAliasIdChanging(value);
this.SendPropertyChanging();
this._ModifiedByPersonAliasId = value;
this.SendPropertyChanged("ModifiedByPersonAliasId");
this.OnModifiedByPersonAliasIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ForeignKey", DbType="NVarChar(100)")]
public string ForeignKey
{
get
{
return this._ForeignKey;
}
set
{
if ((this._ForeignKey != value))
{
this.OnForeignKeyChanging(value);
this.SendPropertyChanging();
this._ForeignKey = value;
this.SendPropertyChanged("ForeignKey");
this.OnForeignKeyChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ForeignGuid", DbType="UniqueIdentifier")]
public System.Nullable<System.Guid> ForeignGuid
{
get
{
return this._ForeignGuid;
}
set
{
if ((this._ForeignGuid != value))
{
this.OnForeignGuidChanging(value);
this.SendPropertyChanging();
this._ForeignGuid = value;
this.SendPropertyChanged("ForeignGuid");
this.OnForeignGuidChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ForeignId", DbType="Int")]
public System.Nullable<int> ForeignId
{
get
{
return this._ForeignId;
}
set
{
if ((this._ForeignId != value))
{
this.OnForeignIdChanging(value);
this.SendPropertyChanging();
this._ForeignId = value;
this.SendPropertyChanged("ForeignId");
this.OnForeignIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="LookupData_PersonData", Storage="_Persons", ThisKey="Id", OtherKey="MaritalStatusValueId")]
public EntitySet<PersonData> Persons
{
get
{
return this._Persons;
}
set
{
this._Persons.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="LookupData_PersonData1", Storage="_Persons1", ThisKey="Id", OtherKey="ConnectionStatusValueId")]
public EntitySet<PersonData> Persons1
{
get
{
return this._Persons1;
}
set
{
this._Persons1.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="LookupData_PersonData2", Storage="_Persons2", ThisKey="Id", OtherKey="RecordStatusReasonValueId")]
public EntitySet<PersonData> Persons2
{
get
{
return this._Persons2;
}
set
{
this._Persons2.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="LookupData_PersonData3", Storage="_Persons3", ThisKey="Id", OtherKey="RecordStatusValueId")]
public EntitySet<PersonData> Persons3
{
get
{
return this._Persons3;
}
set
{
this._Persons3.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="LookupData_PersonData4", Storage="_Persons4", ThisKey="Id", OtherKey="RecordTypeValueId")]
public EntitySet<PersonData> Persons4
{
get
{
return this._Persons4;
}
set
{
this._Persons4.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="LookupData_PersonData5", Storage="_Persons5", ThisKey="Id", OtherKey="ReviewReasonValueId")]
public EntitySet<PersonData> Persons5
{
get
{
return this._Persons5;
}
set
{
this._Persons5.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="LookupData_PersonData6", Storage="_Persons6", ThisKey="Id", OtherKey="SuffixValueId")]
public EntitySet<PersonData> Persons6
{
get
{
return this._Persons6;
}
set
{
this._Persons6.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="LookupData_PersonData7", Storage="_PersonDatas", ThisKey="Id", OtherKey="TitleValueId")]
public EntitySet<PersonData> PersonDatas
{
get
{
return this._PersonDatas;
}
set
{
this._PersonDatas.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="PersonAliasData_LookupData", Storage="_PersonAlia", ThisKey="CreatedByPersonAliasId", OtherKey="Id", IsForeignKey=true)]
public PersonAliasData PersonAlia
{
get
{
return this._PersonAlia.Entity;
}
set
{
PersonAliasData previousValue = this._PersonAlia.Entity;
if (((previousValue != value)
|| (this._PersonAlia.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._PersonAlia.Entity = null;
previousValue.LookupDatas.Remove(this);
}
this._PersonAlia.Entity = value;
if ((value != null))
{
value.LookupDatas.Add(this);
this._CreatedByPersonAliasId = value.Id;
}
else
{
this._CreatedByPersonAliasId = default(Nullable<int>);
}
this.SendPropertyChanged("PersonAlia");
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="PersonAliasData_LookupData1", Storage="_PersonAliasData", ThisKey="ModifiedByPersonAliasId", OtherKey="Id", IsForeignKey=true)]
public PersonAliasData PersonAliasData
{
get
{
return this._PersonAliasData.Entity;
}
set
{
PersonAliasData previousValue = this._PersonAliasData.Entity;
if (((previousValue != value)
|| (this._PersonAliasData.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._PersonAliasData.Entity = null;
previousValue.LookupDatas1.Remove(this);
}
this._PersonAliasData.Entity = value;
if ((value != null))
{
value.LookupDatas1.Add(this);
this._ModifiedByPersonAliasId = value.Id;
}
else
{
this._ModifiedByPersonAliasId = default(Nullable<int>);
}
this.SendPropertyChanged("PersonAliasData");
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
private void attach_Persons(PersonData entity)
{
this.SendPropertyChanging();
entity.DefinedValue = this;
}
private void detach_Persons(PersonData entity)
{
this.SendPropertyChanging();
entity.DefinedValue = null;
}
private void attach_Persons1(PersonData entity)
{
this.SendPropertyChanging();
entity.DefinedValue1 = this;
}
private void detach_Persons1(PersonData entity)
{
this.SendPropertyChanging();
entity.DefinedValue1 = null;
}
private void attach_Persons2(PersonData entity)
{
this.SendPropertyChanging();
entity.DefinedValue2 = this;
}
private void detach_Persons2(PersonData entity)
{
this.SendPropertyChanging();
entity.DefinedValue2 = null;
}
private void attach_Persons3(PersonData entity)
{
this.SendPropertyChanging();
entity.DefinedValue3 = this;
}
private void detach_Persons3(PersonData entity)
{
this.SendPropertyChanging();
entity.DefinedValue3 = null;
}
private void attach_Persons4(PersonData entity)
{
this.SendPropertyChanging();
entity.DefinedValue4 = this;
}
private void detach_Persons4(PersonData entity)
{
this.SendPropertyChanging();
entity.DefinedValue4 = null;
}
private void attach_Persons5(PersonData entity)
{
this.SendPropertyChanging();
entity.DefinedValue5 = this;
}
private void detach_Persons5(PersonData entity)
{
this.SendPropertyChanging();
entity.DefinedValue5 = null;
}
private void attach_Persons6(PersonData entity)
{
this.SendPropertyChanging();
entity.DefinedValue6 = this;
}
private void detach_Persons6(PersonData entity)
{
this.SendPropertyChanging();
entity.DefinedValue6 = null;
}
private void attach_PersonDatas(PersonData entity)
{
this.SendPropertyChanging();
entity.LookupData = this;
}
private void detach_PersonDatas(PersonData entity)
{
this.SendPropertyChanging();
entity.LookupData = null;
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.PersonAlias")]
public partial class PersonAliasData : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private int _Id;
private string _Name;
private int _PersonId;
private int _AliasPersonId;
private System.Guid _AliasPersonGuid;
private System.Guid _Guid;
private string _ForeignKey;
private System.Nullable<System.Guid> _ForeignGuid;
private System.Nullable<int> _ForeignId;
private EntitySet<PersonData> _PersonDatas;
private EntitySet<PersonData> _PersonDatas1;
private EntitySet<LookupData> _LookupDatas;
private EntitySet<LookupData> _LookupDatas1;
private EntityRef<PersonData> _PersonData;
#region Extensibility Method Definitions
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnIdChanging(int value);
partial void OnIdChanged();
partial void OnNameChanging(string value);
partial void OnNameChanged();
partial void OnPersonIdChanging(int value);
partial void OnPersonIdChanged();
partial void OnAliasPersonIdChanging(int value);
partial void OnAliasPersonIdChanged();
partial void OnAliasPersonGuidChanging(System.Guid value);
partial void OnAliasPersonGuidChanged();
partial void OnGuidChanging(System.Guid value);
partial void OnGuidChanged();
partial void OnForeignKeyChanging(string value);
partial void OnForeignKeyChanged();
partial void OnForeignGuidChanging(System.Nullable<System.Guid> value);
partial void OnForeignGuidChanged();
partial void OnForeignIdChanging(System.Nullable<int> value);
partial void OnForeignIdChanged();
#endregion
public PersonAliasData()
{
this._PersonDatas = new EntitySet<PersonData>(new Action<PersonData>(this.attach_PersonDatas), new Action<PersonData>(this.detach_PersonDatas));
this._PersonDatas1 = new EntitySet<PersonData>(new Action<PersonData>(this.attach_PersonDatas1), new Action<PersonData>(this.detach_PersonDatas1));
this._LookupDatas = new EntitySet<LookupData>(new Action<LookupData>(this.attach_LookupDatas), new Action<LookupData>(this.detach_LookupDatas));
this._LookupDatas1 = new EntitySet<LookupData>(new Action<LookupData>(this.attach_LookupDatas1), new Action<LookupData>(this.detach_LookupDatas1));
this._PersonData = default(EntityRef<PersonData>);
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="Int NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
public int Id
{
get
{
return this._Id;
}
set
{
if ((this._Id != value))
{
this.OnIdChanging(value);
this.SendPropertyChanging();
this._Id = value;
this.SendPropertyChanged("Id");
this.OnIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(200)")]
public string Name
{
get
{
return this._Name;
}
set
{
if ((this._Name != value))
{
this.OnNameChanging(value);
this.SendPropertyChanging();
this._Name = value;
this.SendPropertyChanged("Name");
this.OnNameChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PersonId", DbType="Int NOT NULL")]
public int PersonId
{
get
{
return this._PersonId;
}
set
{
if ((this._PersonId != value))
{
if (this._PersonData.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnPersonIdChanging(value);
this.SendPropertyChanging();
this._PersonId = value;
this.SendPropertyChanged("PersonId");
this.OnPersonIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AliasPersonId", DbType="Int NOT NULL")]
public int AliasPersonId
{
get
{
return this._AliasPersonId;
}
set
{
if ((this._AliasPersonId != value))
{
this.OnAliasPersonIdChanging(value);
this.SendPropertyChanging();
this._AliasPersonId = value;
this.SendPropertyChanged("AliasPersonId");
this.OnAliasPersonIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AliasPersonGuid", DbType="UniqueIdentifier NOT NULL")]
public System.Guid AliasPersonGuid
{
get
{
return this._AliasPersonGuid;
}
set
{
if ((this._AliasPersonGuid != value))
{
this.OnAliasPersonGuidChanging(value);
this.SendPropertyChanging();
this._AliasPersonGuid = value;
this.SendPropertyChanged("AliasPersonGuid");
this.OnAliasPersonGuidChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Guid", DbType="UniqueIdentifier NOT NULL")]
public System.Guid Guid
{
get
{
return this._Guid;
}
set
{
if ((this._Guid != value))
{
this.OnGuidChanging(value);
this.SendPropertyChanging();
this._Guid = value;
this.SendPropertyChanged("Guid");
this.OnGuidChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ForeignKey", DbType="NVarChar(100)")]
public string ForeignKey
{
get
{
return this._ForeignKey;
}
set
{
if ((this._ForeignKey != value))
{
this.OnForeignKeyChanging(value);
this.SendPropertyChanging();
this._ForeignKey = value;
this.SendPropertyChanged("ForeignKey");
this.OnForeignKeyChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ForeignGuid", DbType="UniqueIdentifier")]
public System.Nullable<System.Guid> ForeignGuid
{
get
{
return this._ForeignGuid;
}
set
{
if ((this._ForeignGuid != value))
{
this.OnForeignGuidChanging(value);
this.SendPropertyChanging();
this._ForeignGuid = value;
this.SendPropertyChanged("ForeignGuid");
this.OnForeignGuidChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ForeignId", DbType="Int")]
public System.Nullable<int> ForeignId
{
get
{
return this._ForeignId;
}
set
{
if ((this._ForeignId != value))
{
this.OnForeignIdChanging(value);
this.SendPropertyChanging();
this._ForeignId = value;
this.SendPropertyChanged("ForeignId");
this.OnForeignIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="PersonAliasData_PersonData", Storage="_PersonDatas", ThisKey="Id", OtherKey="CreatedByPersonAliasId")]
public EntitySet<PersonData> PersonDatas
{
get
{
return this._PersonDatas;
}
set
{
this._PersonDatas.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="PersonAliasData_PersonData1", Storage="_PersonDatas1", ThisKey="Id", OtherKey="ModifiedByPersonAliasId")]
public EntitySet<PersonData> PersonDatas1
{
get
{
return this._PersonDatas1;
}
set
{
this._PersonDatas1.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="PersonAliasData_LookupData", Storage="_LookupDatas", ThisKey="Id", OtherKey="CreatedByPersonAliasId")]
public EntitySet<LookupData> LookupDatas
{
get
{
return this._LookupDatas;
}
set
{
this._LookupDatas.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="PersonAliasData_LookupData1", Storage="_LookupDatas1", ThisKey="Id", OtherKey="ModifiedByPersonAliasId")]
public EntitySet<LookupData> LookupDatas1
{
get
{
return this._LookupDatas1;
}
set
{
this._LookupDatas1.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="PersonData_PersonAliasData", Storage="_PersonData", ThisKey="PersonId", OtherKey="Id", IsForeignKey=true)]
public PersonData PersonData
{
get
{
return this._PersonData.Entity;
}
set
{
PersonData previousValue = this._PersonData.Entity;
if (((previousValue != value)
|| (this._PersonData.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._PersonData.Entity = null;
previousValue.PersonAliasDatas.Remove(this);
}
this._PersonData.Entity = value;
if ((value != null))
{
value.PersonAliasDatas.Add(this);
this._PersonId = value.Id;
}
else
{
this._PersonId = default(int);
}
this.SendPropertyChanged("PersonData");
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
private void attach_PersonDatas(PersonData entity)
{
this.SendPropertyChanging();
entity.PersonAlia = this;
}
private void detach_PersonDatas(PersonData entity)
{
this.SendPropertyChanging();
entity.PersonAlia = null;
}
private void attach_PersonDatas1(PersonData entity)
{
this.SendPropertyChanging();
entity.PersonAlia1 = this;
}
private void detach_PersonDatas1(PersonData entity)
{
this.SendPropertyChanging();
entity.PersonAlia1 = null;
}
private void attach_LookupDatas(LookupData entity)
{
this.SendPropertyChanging();
entity.PersonAlia = this;
}
private void detach_LookupDatas(LookupData entity)
{
this.SendPropertyChanging();
entity.PersonAlia = null;
}
private void attach_LookupDatas1(LookupData entity)
{
this.SendPropertyChanging();
entity.PersonAliasData = this;
}
private void detach_LookupDatas1(LookupData entity)
{
this.SendPropertyChanging();
entity.PersonAliasData = null;
}
}
public partial class cust_secc_sp_get_personID_byPersonAttributeValueResult
{
private int _person_id;
public cust_secc_sp_get_personID_byPersonAttributeValueResult()
{
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_person_id", DbType="Int NOT NULL")]
public int person_id
{
get
{
return this._person_id;
}
set
{
if ((this._person_id != value))
{
this._person_id = value;
}
}
}
}
}
#pragma warning restore 1591
| 27.515919 | 778 | 0.674944 | [
"ECL-2.0"
] | engineeringdrew/RockPlugins | Plugins/org.secc.Purchasing/App_Code/DataLayer/Purchasing.designer.cs | 296,429 | C# |
/*
Author : LimerBoy
Github : github.com/LimerBoy/FireFox-Thief
*/
using System;
using System.IO;
using System.Collections.Generic;
using Stealer.Helpers;
using static Stealer.Helpers.Common;
namespace Stealer.Reader
{
internal sealed class History
{
// Get cookies from gecko browser
public static List<Site> Get(string BrowserDir)
{
List<Site> scHistory = new List<Site>();
// Get firefox default profile directory
string profile = Profile.GetProfile(BrowserDir);
// Read cookies from file
if (profile == null) return scHistory;
string db_location = Path.Combine(profile, "places.sqlite");
// Read data from table
SQLite sSQLite = SQLite.ReadTable(db_location, "moz_places");
if (sSQLite == null) return scHistory;
// Get values from table
for (int i = 0; i < sSQLite.GetRowCount(); i++)
{
Site sSite = new Site();
sSite.sUrl = Decryptor.GetUTF8(sSQLite.GetValue(i, 1));
sSite.sTitle = Decryptor.GetUTF8(sSQLite.GetValue(i, 2));
sSite.iCount = Convert.ToInt32(sSQLite.GetValue(i, 4)) + 1;
if (sSite.sTitle != "0")
{
scHistory.Add(sSite);
}
}
return scHistory;
}
}
}
| 32.152174 | 76 | 0.534821 | [
"MIT"
] | LimerBoy/FireFox-Thief | Stealer/Modules/Reader/History.cs | 1,481 | C# |
// ***********************************************************************
// Copyright (c) 2010-2016 Charlie Poole, Rob Prouse
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// ***********************************************************************
using NUnit.Framework.Interfaces;
using System;
namespace NUnit.Framework.Internal.Results
{
public class TestResultIgnoredWithReasonGivenTests : TestResultIgnoredTests
{
public TestResultIgnoredWithReasonGivenTests() : base(NonWhitespaceIgnoreReason, tnode => ReasonNodeExpectedValidation(tnode, NonWhitespaceIgnoreReason))
{
}
}
public class TestResultIgnoredWithNullReasonGivenTests : TestResultIgnoredTests
{
public TestResultIgnoredWithNullReasonGivenTests() : base(null, NoReasonNodeExpectedValidation)
{
}
}
public class TestResultIgnoredWithEmptyReasonGivenTests : TestResultIgnoredTests
{
public TestResultIgnoredWithEmptyReasonGivenTests() : base(string.Empty, NoReasonNodeExpectedValidation)
{
}
}
public class TestResultIgnoredWithWhitespaceReasonGivenTests : TestResultIgnoredTests
{
public TestResultIgnoredWithWhitespaceReasonGivenTests() : base(" ", NoReasonNodeExpectedValidation)
{
}
}
public abstract class TestResultIgnoredTests : TestResultTests
{
protected string _ignoreReason;
private Action<TNode> _xmlReasonNodeValidation;
protected TestResultIgnoredTests(string ignoreReason, Action<TNode> xmlReasonNodeValidation)
{
_ignoreReason = ignoreReason;
_xmlReasonNodeValidation = xmlReasonNodeValidation;
}
[SetUp]
public void SimulateTestRun()
{
_testResult.SetResult(ResultState.Ignored, _ignoreReason);
_suiteResult.AddResult(_testResult);
}
[Test]
public void TestResultIsIgnored()
{
Assert.AreEqual(ResultState.Ignored, _testResult.ResultState);
Assert.AreEqual(_ignoreReason, _testResult.Message);
}
[Test]
public void SuiteResultIsIgnored()
{
Assert.AreEqual(ResultState.ChildIgnored, _suiteResult.ResultState);
Assert.AreEqual(TestResult.CHILD_IGNORE_MESSAGE, _suiteResult.Message);
Assert.AreEqual(0, _suiteResult.PassCount);
Assert.AreEqual(0, _suiteResult.FailCount);
Assert.AreEqual(0, _suiteResult.WarningCount);
Assert.AreEqual(1, _suiteResult.SkipCount);
Assert.AreEqual(0, _suiteResult.InconclusiveCount);
Assert.AreEqual(0, _suiteResult.AssertCount);
}
[Test]
public void TestResultXmlNodeIsIgnored()
{
TNode testNode = _testResult.ToXml(true);
Assert.AreEqual("Skipped", testNode.Attributes["result"]);
Assert.AreEqual("Ignored", testNode.Attributes["label"]);
Assert.AreEqual(null, testNode.Attributes["site"]);
_xmlReasonNodeValidation(testNode);
}
[Test]
public void SuiteResultXmlNodeIsIgnored()
{
TNode suiteNode = _suiteResult.ToXml(true);
Assert.AreEqual("Skipped", suiteNode.Attributes["result"]);
Assert.AreEqual("Ignored", suiteNode.Attributes["label"]);
Assert.AreEqual("Child", suiteNode.Attributes["site"]);
Assert.AreEqual("0", suiteNode.Attributes["passed"]);
Assert.AreEqual("0", suiteNode.Attributes["failed"]);
Assert.AreEqual("0", suiteNode.Attributes["warnings"]);
Assert.AreEqual("1", suiteNode.Attributes["skipped"]);
Assert.AreEqual("0", suiteNode.Attributes["inconclusive"]);
Assert.AreEqual("0", suiteNode.Attributes["asserts"]);
}
}
}
| 39.224 | 161 | 0.662248 | [
"MIT"
] | garora/nunit | src/NUnitFramework/tests/Internal/Results/TestResultIgnoredTests.cs | 4,903 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Tools
{
/// <summary>
/// 拖拽处理
/// </summary>
public class DragDropTool
{
/// <summary>
/// DragEnter
/// </summary>
public static void Form_DragEnter(object sender, DragEventArgs e)
{
dragEnter(e);
}
/// <summary>
/// DragDrop
/// </summary>
public static string[] Form_DragDrop(object sender, DragEventArgs e)
{
TextBox textBox = sender as TextBox;
textBox.Text = dragDrop(e); // 获取拖入的文件
string[] files = textBox.Text.Split(';');
// 其他处理逻辑
return files;
}
/// <summary>
/// 获取files文件或目录列表下的所有文件信息
/// </summary>
public static string[] GetSubFiles(Array files)
{
string AllFiles = toSubDirFileNames(files);
string[] SubFiles = AllFiles.Split(';');
return SubFiles;
}
# region 文件拖拽
/// <summary>
/// 文件拖进事件处理:
/// </summary>
private static void dragEnter(DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.FileDrop)) //判断拖来的是否是文件
e.Effect = DragDropEffects.Link; //是则将拖动源中的数据连接到控件
else e.Effect = DragDropEffects.None;
}
/// <summary>
/// 文件放下事件处理:
/// 放下, 另外需设置对应控件的 AllowDrop = true;
/// 获取的文件名形如 "d:\1.txt;d:\2.txt"
/// </summary>
private static string dragDrop(DragEventArgs e)
{
Array file = (System.Array)e.Data.GetData(DataFormats.FileDrop);//将拖来的数据转化为数组存储
return toSubDirFileNames(file);
}
// 获取所有files目录下的所有文件,转化为单个串
private static string toSubDirFileNames(Array files)
{
StringBuilder filesName = new StringBuilder("");
foreach (object I in files)
{
string str = I.ToString();
System.IO.FileInfo info = new System.IO.FileInfo(str);
//若为目录,则获取目录下所有子文件名
if ((info.Attributes & System.IO.FileAttributes.Directory) != 0)
{
str = getAllFiles(str);
if (!str.Equals("")) filesName.Append((filesName.Length == 0 ? "" : ";") + str);
}
//若为文件,则获取文件名
else if (System.IO.File.Exists(str))
filesName.Append((filesName.Length == 0 ? "" : ";") + str);
}
return filesName.ToString();
}
/// <summary>
/// 判断path是否为目录
/// </summary>
private static bool IsDirectory(String path)
{
System.IO.FileInfo info = new System.IO.FileInfo(path);
return (info.Attributes & System.IO.FileAttributes.Directory) != 0;
}
/// <summary>
/// 获取目录path下所有子文件名
/// </summary>
private static string getAllFiles(String path)
{
StringBuilder str = new StringBuilder("");
if (System.IO.Directory.Exists(path))
{
//所有子文件名
string[] files = System.IO.Directory.GetFiles(path);
foreach (string file in files)
str.Append((str.Length == 0 ? "" : ";") + file);
//所有子目录名
string[] Dirs = System.IO.Directory.GetDirectories(path);
foreach (string dir in Dirs)
{
string tmp = getAllFiles(dir); //子目录下所有子文件名
if (!tmp.Equals("")) str.Append((str.Length == 0 ? "" : ";") + tmp);
}
}
return str.ToString();
}
# endregion
}
}
| 31.052632 | 101 | 0.478692 | [
"MIT"
] | scimence/Tools | Tools/Tools/DragDropTool.cs | 4,534 | C# |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace System.Net.Http
{
internal sealed partial class HttpProxyConnectionHandler : HttpMessageHandler
{
private static IWebProxy ConstructSystemProxy()
{
return HttpSystemProxy.TryCreate(out IWebProxy proxy) ? proxy : null;
}
}
}
| 30.4375 | 81 | 0.710472 | [
"MIT"
] | rsumner31/corefx2 | src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpProxyConnectionHandler.Windows.cs | 487 | C# |
/* 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.
*/
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("RabbitMQHare")]
[assembly: AssemblyDescription("Simple wrapper around rabbit official client")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Criteo")]
[assembly: AssemblyProduct("RabbitMQHare")]
[assembly: AssemblyCopyright("Copyright © Criteo 2013")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("058763b1-7003-4abe-86f7-e7f58334b2c7")]
[assembly: InternalsVisibleTo("RabbitMQHare.UTest")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion(Info.Version)]
[assembly: AssemblyFileVersion(Info.Version)]
[assembly: AssemblyInformationalVersion(Info.Version)]
public static class Info
{
public const string Version = "4.4.0";
}
| 40.901639 | 85 | 0.741884 | [
"Apache-2.0"
] | criteo/RabbitMQHare | RabbitMQHare/Properties/AssemblyInfo.cs | 2,498 | C# |
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
using System;
using System.Collections.ObjectModel;
using System.Linq;
using System.Windows.Input;
using System.Windows.Threading;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Editor;
using ICSharpCode.SharpDevelop.Editor.AvalonEdit;
using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.SharpDevelop.Refactoring;
namespace ICSharpCode.AvalonEdit.AddIn
{
/// <summary>
/// Renders Popup with context actions on the left side of the current line in the editor.
/// </summary>
public sealed class ContextActionsRenderer : IDisposable
{
readonly CodeEditorView editorView;
ITextEditor Editor { get { return this.editorView.Adapter; } }
/// <summary>
/// This popup is reused (closed and opened again).
/// </summary>
ContextActionsBulbPopup popup = new ContextActionsBulbPopup();
/// <summary>
/// Delays the available actions resolution so that it does not get called too often when user holds an arrow.
/// </summary>
DispatcherTimer delayMoveTimer;
const int delayMoveMilliseconds = 500;
public bool IsEnabled
{
get {
string fileName = this.Editor.FileName;
if (String.IsNullOrEmpty(fileName))
return false;
return fileName.EndsWith(".cs", StringComparison.OrdinalIgnoreCase)
|| fileName.EndsWith(".vb", StringComparison.OrdinalIgnoreCase);
}
}
public ContextActionsRenderer(CodeEditorView editor)
{
if (editor == null)
throw new ArgumentNullException("editor");
this.editorView = editor;
this.editorView.TextArea.Caret.PositionChanged += CaretPositionChanged;
this.editorView.KeyDown += new KeyEventHandler(ContextActionsRenderer_KeyDown);
editor.TextArea.TextView.ScrollOffsetChanged += ScrollChanged;
this.delayMoveTimer = new DispatcherTimer() { Interval = TimeSpan.FromMilliseconds(delayMoveMilliseconds) };
this.delayMoveTimer.Stop();
this.delayMoveTimer.Tick += TimerMoveTick;
WorkbenchSingleton.Workbench.ActiveViewContentChanged += WorkbenchSingleton_Workbench_ActiveViewContentChanged;
}
public void Dispose()
{
ClosePopup();
WorkbenchSingleton.Workbench.ActiveViewContentChanged -= WorkbenchSingleton_Workbench_ActiveViewContentChanged;
}
void ContextActionsRenderer_KeyDown(object sender, KeyEventArgs e)
{
if (this.popup == null)
return;
if (e.Key == Key.T && Keyboard.Modifiers == ModifierKeys.Control) {
if (popup.ViewModel != null && popup.ViewModel.Actions != null && popup.ViewModel.Actions.Count > 0) {
popup.IsDropdownOpen = true;
popup.Focus();
} else {
ClosePopup();
// Popup is not shown but user explicitely requests it
var popupVM = BuildPopupViewModel(this.Editor);
popupVM.LoadHiddenActions();
if (popupVM.Actions.Count == 0 && popupVM.HiddenActions.Count == 0)
return;
this.popup.ViewModel = popupVM;
this.popup.IsDropdownOpen = true;
this.popup.IsHiddenActionsExpanded = popupVM.Actions.Count == 0;
this.popup.OpenAtLineStart(this.Editor);
this.popup.Focus();
}
}
}
void ScrollChanged(object sender, EventArgs e)
{
StartTimer();
}
void TimerMoveTick(object sender, EventArgs e)
{
if (!delayMoveTimer.IsEnabled)
return;
ClosePopup();
if (!IsEnabled)
return;
ContextActionsBulbViewModel popupVM = BuildPopupViewModel(this.Editor);
//availableActionsVM.Title =
//availableActionsVM.Image =
if (popupVM.Actions.Count == 0)
return;
this.popup.ViewModel = popupVM;
this.popup.OpenAtLineStart(this.Editor);
}
EditorActionsProvider lastActions;
ContextActionsBulbViewModel BuildPopupViewModel(ITextEditor editor)
{
var actionsProvider = ContextActionsService.Instance.GetAvailableActions(editor);
this.lastActions = actionsProvider;
return new ContextActionsBulbViewModel(actionsProvider);
}
void CaretPositionChanged(object sender, EventArgs e)
{
StartTimer();
}
void StartTimer()
{
ClosePopup();
IViewContent activeViewContent = WorkbenchSingleton.Workbench.ActiveViewContent;
if (activeViewContent != null && activeViewContent.PrimaryFileName == this.Editor.FileName)
delayMoveTimer.Start();
}
void ClosePopup()
{
this.delayMoveTimer.Stop();
this.popup.Close();
this.popup.IsDropdownOpen = false;
this.popup.IsHiddenActionsExpanded = false;
this.popup.ViewModel = null;
if (this.lastActions != null) {
// Clear the context to prevent memory leaks in case some users kept long-lived references to EditorContext
this.lastActions.EditorContext.Clear();
this.lastActions = null;
}
}
void WorkbenchSingleton_Workbench_ActiveViewContentChanged(object sender, EventArgs e)
{
// open the popup again if in current file
StartTimer();
}
}
}
| 31.607595 | 114 | 0.73348 | [
"MIT"
] | Plankankul/SharpDevelop-w-Framework | src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/ContextActionsRenderer.cs | 4,996 | C# |
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Spear : MonoBehaviour
{
public Transform ThrownSpear;
public SpearTrail SpearTrail;
public Slider slider;
private const float AttackTimeout = 0.2f;
private const float HalfAttackTimeout = AttackTimeout / 2f;
private float _attackMeleeOutElapsed;
private float _attackMeleeInElapsed;
private bool _attacking;
private bool _attackingMelee;
private bool _attackingMeleeOut;
private bool _attackingThrow;
private const float AttackThrowChargeTime = 0.5f;
private float _attackThrowChargeElapsed;
private bool _attackThrowCharging;
private readonly RaycastHit2D[] _enemyHits = new RaycastHit2D[30];
private bool _attackingThrowSkipFrame;
private Vector3 _originalPosition;
private Vector3 _attackPosition;
private SpriteRenderer _spriteRenderer;
private ParticleSystem _spearEffects;
private Collider2D _collider2D;
private Transform _player;
private Camera _mainCamera;
// Start is called before the first frame update
private void Awake()
{
_originalPosition = transform.localPosition;
_spriteRenderer = GetComponent<SpriteRenderer>();
_spearEffects = GetComponentInChildren<ParticleSystem>();
ThrownSpear.GetComponent<SpriteRenderer>().enabled = false;
ThrownSpear.GetComponentInChildren<ParticleSystem>().Stop(true, ParticleSystemStopBehavior.StopEmittingAndClear);
_collider2D = GetComponent<Collider2D>();
_player = GameObject.FindGameObjectWithTag("Player").transform;
_mainCamera = Camera.main;
slider.maxValue = AttackThrowChargeTime;
}
// Update is called once per frame
private void Update()
{
if (!GameController.IsGameRunning)
return;
if (!_attacking && Input.GetMouseButtonDown(0))
{
_attacking = true;
_attackingMelee = true;
_attackingMeleeOut = true;
_attackPosition = _originalPosition + (Vector3.right * 2f);
}
else if (!_attacking && Input.GetMouseButtonDown(1))
{
_attackThrowCharging = true;
}
if (_attackThrowCharging)
{
_attackThrowChargeElapsed += Time.deltaTime;
if (_attackThrowChargeElapsed >= AttackThrowChargeTime)
{
if (Input.GetMouseButtonUp(1))
{
_attacking = true;
_attackingThrow = true;
_attackingThrowSkipFrame = true;
_attackThrowChargeElapsed = 0f;
_attackThrowCharging = false;
slider.value = 0f;
var mousePos = _mainCamera.ScreenToWorldPoint(Input.mousePosition);
var pos = transform.position;
var right = mousePos.x < _player.position.x ? -transform.right : transform.right;
var thrownHit = Physics2D.Raycast(pos, right, 100f, LayerMask.GetMask("Ground"));
var numOfEnemyHits = Physics2D.RaycastNonAlloc(pos, right, _enemyHits, thrownHit.distance, LayerMask.GetMask("Enemy"));
for (var i = 0; i < numOfEnemyHits; i++)
{
var enemy = _enemyHits[i];
enemy.transform.GetComponent<Enemy>().Die();
}
_spriteRenderer.enabled = false;
_spearEffects.Stop(true, ParticleSystemStopBehavior.StopEmittingAndClear);
_collider2D.enabled = false;
ThrownSpear.position = thrownHit.point;
//ThrownSpear.right = mousePos.x < _player.position.x ? transform.right : -transform.right;
ThrownSpear.right = right;
ThrownSpear.GetComponent<SpriteRenderer>().enabled = true;
ThrownSpear.GetComponentInChildren<ParticleSystem>().Play(true);
SpearTrail.ShowTrail(transform.position, thrownHit.point);
}
}
else
{
slider.value = _attackThrowChargeElapsed;
if (Input.GetMouseButtonUp(1))
{
_attackThrowCharging = false;
_attackThrowChargeElapsed = 0f;
slider.value = 0f;
}
}
}
if (_attacking)
{
if (_attackingMelee)
{
if (_attackingMeleeOut)
{
_attackMeleeOutElapsed += Time.deltaTime;
if (_attackMeleeOutElapsed >= HalfAttackTimeout)
{
_attackMeleeOutElapsed = 0f;
_attackingMeleeOut = false;
}
else
{
var scale = _attackMeleeOutElapsed / HalfAttackTimeout;
var newPos = Vector3.Lerp(_originalPosition, _attackPosition, scale);
transform.localPosition = newPos;
}
}
else
{
_attackMeleeInElapsed += Time.deltaTime;
if (_attackMeleeInElapsed >= HalfAttackTimeout)
{
_attackMeleeInElapsed = 0f;
_attackingMelee = false;
_attacking = false;
}
else
{
var scale = _attackMeleeInElapsed / HalfAttackTimeout;
var newPos = Vector3.Lerp(_attackPosition, _originalPosition, scale);
transform.localPosition = newPos;
}
}
}
else if (_attackingThrow)
{
if (_attackingThrowSkipFrame)
{
_attackingThrowSkipFrame = false;
}
else
{
// basically waiting for player to return the spear
if (Input.GetMouseButtonDown(1))
{
// return it
_attacking = false;
_attackingThrow = false;
_spriteRenderer.enabled = true;
_spearEffects.Play();
_collider2D.enabled = true;
ThrownSpear.GetComponent<SpriteRenderer>().enabled = false;
ThrownSpear.GetComponentInChildren<ParticleSystem>().Stop(true, ParticleSystemStopBehavior.StopEmittingAndClear);
SpearTrail.ShowTrail(ThrownSpear.position, transform.position);
var diff = transform.position - ThrownSpear.position;
var numOfEnemyHits = Physics2D.RaycastNonAlloc(ThrownSpear.position, diff.normalized, _enemyHits, diff.magnitude, LayerMask.GetMask("Enemy"));
for (var i = 0; i < numOfEnemyHits; i++)
{
_enemyHits[i].transform.GetComponent<Enemy>().Die();
}
}
}
}
}
}
private void OnTriggerEnter2D(Collider2D other)
{
if (_attackingMelee && other.CompareTag("Enemy"))
{
other.GetComponent<Enemy>().Die();
}
}
} | 40.699482 | 167 | 0.525652 | [
"MIT"
] | ChrisWoody/Spear | Assets/Scripts/Spear.cs | 7,855 | C# |
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.IO;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNet.Testing;
using Microsoft.Extensions.MemoryPool;
using Xunit;
namespace Microsoft.AspNet.Mvc
{
public class HttpResponseStreamWriterTest
{
[Fact]
public async Task DoesNotWriteBOM()
{
// Arrange
var memoryStream = new MemoryStream();
var encodingWithBOM = new UTF8Encoding(encoderShouldEmitUTF8Identifier: true);
var writer = new HttpResponseStreamWriter(memoryStream, encodingWithBOM);
var expectedData = new byte[] { 97, 98, 99, 100 }; // without BOM
// Act
using (writer)
{
await writer.WriteAsync("abcd");
}
// Assert
Assert.Equal(expectedData, memoryStream.ToArray());
}
[Fact]
public async Task DoesNotFlush_UnderlyingStream_OnClosingWriter()
{
// Arrange
var stream = new TestMemoryStream();
var writer = new HttpResponseStreamWriter(stream, Encoding.UTF8);
// Act
await writer.WriteAsync("Hello");
writer.Close();
// Assert
Assert.Equal(0, stream.FlushCallCount);
Assert.Equal(0, stream.FlushAsyncCallCount);
}
[Fact]
public async Task DoesNotFlush_UnderlyingStream_OnDisposingWriter()
{
// Arrange
var stream = new TestMemoryStream();
var writer = new HttpResponseStreamWriter(stream, Encoding.UTF8);
// Act
await writer.WriteAsync("Hello");
writer.Dispose();
// Assert
Assert.Equal(0, stream.FlushCallCount);
Assert.Equal(0, stream.FlushAsyncCallCount);
}
[Fact]
public async Task DoesNotClose_UnderlyingStream_OnDisposingWriter()
{
// Arrange
var stream = new TestMemoryStream();
var writer = new HttpResponseStreamWriter(stream, Encoding.UTF8);
// Act
await writer.WriteAsync("Hello");
writer.Close();
// Assert
Assert.Equal(0, stream.CloseCallCount);
}
[Fact]
public async Task DoesNotDispose_UnderlyingStream_OnDisposingWriter()
{
// Arrange
var stream = new TestMemoryStream();
var writer = new HttpResponseStreamWriter(stream, Encoding.UTF8);
// Act
await writer.WriteAsync("Hello world");
writer.Dispose();
// Assert
Assert.Equal(0, stream.DisposeCallCount);
}
[Theory]
[InlineData(1023)]
[InlineData(1024)]
[InlineData(1050)]
[InlineData(2048)]
public async Task FlushesBuffer_OnClose(int byteLength)
{
// Arrange
var stream = new TestMemoryStream();
var writer = new HttpResponseStreamWriter(stream, Encoding.UTF8);
await writer.WriteAsync(new string('a', byteLength));
// Act
writer.Close();
// Assert
Assert.Equal(0, stream.FlushCallCount);
Assert.Equal(0, stream.FlushAsyncCallCount);
Assert.Equal(byteLength, stream.Length);
}
[Theory]
[InlineData(1023)]
[InlineData(1024)]
[InlineData(1050)]
[InlineData(2048)]
public async Task FlushesBuffer_OnDispose(int byteLength)
{
// Arrange
var stream = new TestMemoryStream();
var writer = new HttpResponseStreamWriter(stream, Encoding.UTF8);
await writer.WriteAsync(new string('a', byteLength));
// Act
writer.Dispose();
// Assert
Assert.Equal(0, stream.FlushCallCount);
Assert.Equal(0, stream.FlushAsyncCallCount);
Assert.Equal(byteLength, stream.Length);
}
[Fact]
public void NoDataWritten_Flush_DoesNotFlushUnderlyingStream()
{
// Arrange
var stream = new TestMemoryStream();
var writer = new HttpResponseStreamWriter(stream, Encoding.UTF8);
// Act
writer.Flush();
// Assert
Assert.Equal(0, stream.FlushCallCount);
Assert.Equal(0, stream.Length);
}
[Theory]
[InlineData(1023)]
[InlineData(1024)]
[InlineData(1050)]
[InlineData(2048)]
public void FlushesBuffer_OnFlush(int byteLength)
{
// Arrange
var stream = new TestMemoryStream();
var writer = new HttpResponseStreamWriter(stream, Encoding.UTF8);
writer.Write(new string('a', byteLength));
// Act
writer.Flush();
// Assert
Assert.Equal(1, stream.FlushCallCount);
Assert.Equal(byteLength, stream.Length);
}
[Fact]
public async Task NoDataWritten_FlushAsync_DoesNotFlushUnderlyingStream()
{
// Arrange
var stream = new TestMemoryStream();
var writer = new HttpResponseStreamWriter(stream, Encoding.UTF8);
// Act
await writer.FlushAsync();
// Assert
Assert.Equal(0, stream.FlushAsyncCallCount);
Assert.Equal(0, stream.Length);
}
[Theory]
[InlineData(1023)]
[InlineData(1024)]
[InlineData(1050)]
[InlineData(2048)]
public async Task FlushesBuffer_OnFlushAsync(int byteLength)
{
// Arrange
var stream = new TestMemoryStream();
var writer = new HttpResponseStreamWriter(stream, Encoding.UTF8);
await writer.WriteAsync(new string('a', byteLength));
// Act
await writer.FlushAsync();
// Assert
Assert.Equal(1, stream.FlushAsyncCallCount);
Assert.Equal(byteLength, stream.Length);
}
[Theory]
[InlineData(1023)]
[InlineData(1024)]
[InlineData(1050)]
[InlineData(2048)]
public void WriteChar_WritesToStream(int byteLength)
{
// Arrange
var stream = new TestMemoryStream();
var writer = new HttpResponseStreamWriter(stream, Encoding.UTF8);
// Act
using (writer)
{
for (var i = 0; i < byteLength; i++)
{
writer.Write('a');
}
}
// Assert
Assert.Equal(byteLength, stream.Length);
}
[Theory]
[InlineData(1023)]
[InlineData(1024)]
[InlineData(1050)]
[InlineData(2048)]
public void WriteCharArray_WritesToStream(int byteLength)
{
// Arrange
var stream = new TestMemoryStream();
var writer = new HttpResponseStreamWriter(stream, Encoding.UTF8);
// Act
using (writer)
{
writer.Write((new string('a', byteLength)).ToCharArray());
}
// Assert
Assert.Equal(byteLength, stream.Length);
}
[Theory]
[InlineData(1023)]
[InlineData(1024)]
[InlineData(1050)]
[InlineData(2048)]
public async Task WriteCharAsync_WritesToStream(int byteLength)
{
// Arrange
var stream = new TestMemoryStream();
var writer = new HttpResponseStreamWriter(stream, Encoding.UTF8);
// Act
using (writer)
{
for (var i = 0; i < byteLength; i++)
{
await writer.WriteAsync('a');
}
}
// Assert
Assert.Equal(byteLength, stream.Length);
}
[Theory]
[InlineData(1023)]
[InlineData(1024)]
[InlineData(1050)]
[InlineData(2048)]
public async Task WriteCharArrayAsync_WritesToStream(int byteLength)
{
// Arrange
var stream = new TestMemoryStream();
var writer = new HttpResponseStreamWriter(stream, Encoding.UTF8);
// Act
using (writer)
{
await writer.WriteAsync((new string('a', byteLength)).ToCharArray());
}
// Assert
Assert.Equal(byteLength, stream.Length);
}
[Theory]
[InlineData("你好世界", "utf-16")]
[InlineData("こんにちは世界", "shift_jis")]
[InlineData("హలో ప్రపంచ", "iso-8859-1")]
[InlineData("வணக்கம் உலக", "utf-32")]
public async Task WritesData_InExpectedEncoding(string data, string encodingName)
{
// Arrange
var encoding = Encoding.GetEncoding(encodingName);
var expectedBytes = encoding.GetBytes(data);
var stream = new MemoryStream();
var writer = new HttpResponseStreamWriter(stream, encoding);
// Act
using (writer)
{
await writer.WriteAsync(data);
}
// Assert
Assert.Equal(expectedBytes, stream.ToArray());
}
[Theory]
[InlineData('ん', 1023, "utf-8")]
[InlineData('ん', 1024, "utf-8")]
[InlineData('ん', 1050, "utf-8")]
[InlineData('你', 1023, "utf-16")]
[InlineData('你', 1024, "utf-16")]
[InlineData('你', 1050, "utf-16")]
[InlineData('こ', 1023, "shift_jis")]
[InlineData('こ', 1024, "shift_jis")]
[InlineData('こ', 1050, "shift_jis")]
[InlineData('హ', 1023, "iso-8859-1")]
[InlineData('హ', 1024, "iso-8859-1")]
[InlineData('హ', 1050, "iso-8859-1")]
[InlineData('வ', 1023, "utf-32")]
[InlineData('வ', 1024, "utf-32")]
[InlineData('வ', 1050, "utf-32")]
public async Task WritesData_OfDifferentLength_InExpectedEncoding(
char character,
int charCount,
string encodingName)
{
// Arrange
var encoding = Encoding.GetEncoding(encodingName);
string data = new string(character, charCount);
var expectedBytes = encoding.GetBytes(data);
var stream = new MemoryStream();
var writer = new HttpResponseStreamWriter(stream, encoding);
// Act
using (writer)
{
await writer.WriteAsync(data);
}
// Assert
Assert.Equal(expectedBytes, stream.ToArray());
}
// None of the code in HttpResponseStreamWriter differs significantly when using pooled buffers.
//
// This test effectively verifies that things are correctly constructed and disposed. Pooled buffers
// throw on the finalizer thread if not disposed, so that's why it's complicated.
[Fact]
public void HttpResponseStreamWriter_UsingPooledBuffers()
{
// Arrange
var encoding = Encoding.UTF8;
var stream = new MemoryStream();
var expectedBytes = encoding.GetBytes("Hello, World!");
using (var bytePool = new DefaultArraySegmentPool<byte>())
{
using (var charPool = new DefaultArraySegmentPool<char>())
{
LeasedArraySegment<byte> bytes = null;
LeasedArraySegment<char> chars = null;
HttpResponseStreamWriter writer;
try
{
bytes = bytePool.Lease(4096);
chars = charPool.Lease(1024);
writer = new HttpResponseStreamWriter(stream, encoding, 1024, bytes, chars);
}
catch
{
if (bytes != null)
{
bytes.Owner.Return(bytes);
}
if (chars != null)
{
chars.Owner.Return(chars);
}
throw;
}
// Act
using (writer)
{
writer.Write("Hello, World!");
}
}
}
// Assert
Assert.Equal(expectedBytes, stream.ToArray());
}
// This covers the error case where the byte buffer is too small. This is a safeguard, and shouldn't happen
// if we're using the writer factory.
[Fact]
public void HttpResponseStreamWriter_UsingPooledBuffers_SmallByteBuffer()
{
// Arrange
var encoding = Encoding.UTF8;
var stream = new MemoryStream();
var message =
"The byte buffer must have a length of at least '12291' to be used with a char buffer of " +
"size '4096' and encoding 'Unicode (UTF-8)'. Use 'System.Text.Encoding.GetMaxByteCount' " +
"to compute the correct size for the byte buffer.";
using (var bytePool = new DefaultArraySegmentPool<byte>())
{
using (var charPool = new DefaultArraySegmentPool<char>())
{
LeasedArraySegment<byte> bytes = null;
LeasedArraySegment<char> chars = null;
HttpResponseStreamWriter writer = null;
try
{
bytes = bytePool.Lease(1024);
chars = charPool.Lease(4096);
// Act & Assert
ExceptionAssert.ThrowsArgument(
() => writer = new HttpResponseStreamWriter(stream, encoding, chars.Data.Count, bytes, chars),
"byteBuffer",
message);
writer.Dispose();
}
catch
{
if (bytes != null)
{
bytes.Owner.Return(bytes);
}
if (chars != null)
{
chars.Owner.Return(chars);
}
}
}
}
}
private class TestMemoryStream : MemoryStream
{
private int _flushCallCount;
private int _flushAsyncCallCount;
private int _closeCallCount;
private int _disposeCallCount;
public int FlushCallCount { get { return _flushCallCount; } }
public int FlushAsyncCallCount { get { return _flushAsyncCallCount; } }
public int CloseCallCount { get { return _closeCallCount; } }
public int DisposeCallCount { get { return _disposeCallCount; } }
public override void Flush()
{
_flushCallCount++;
base.Flush();
}
public override Task FlushAsync(CancellationToken cancellationToken)
{
_flushAsyncCallCount++;
return base.FlushAsync(cancellationToken);
}
public override void Close()
{
_closeCallCount++;
base.Close();
}
protected override void Dispose(bool disposing)
{
_disposeCallCount++;
base.Dispose(disposing);
}
}
}
}
| 31.664694 | 122 | 0.511274 | [
"Apache-2.0"
] | VGGeorgiev/Mvc | test/Microsoft.AspNet.Mvc.Core.Test/HttpResponseStreamWriterTest.cs | 16,144 | C# |
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由Codesmith工具生成。
// 此文件的更改可能会导致不正确的行为,如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using ProtoBuf;
using ZyGames.Framework.Common;
using ZyGames.Framework.Collection;
using ZyGames.Framework.Model;
namespace ZyGames.Doudizhu.Model
{
/// <summary>
/// 每日限制表
/// </summary>
/// <![CDATA[
/// @periodTime:设置生存周期(秒)
/// @personalName: 映射UserId对应的字段名,默认为"UserId"
/// ]]>
/// </remarks>
[Serializable, ProtoContract]
[EntityTable(DbConfig.Data, "UserDailyRestrain", DbConfig.PeriodTime, DbConfig.PersonalName)]
public class UserDailyRestrain : BaseEntity
{
/// <summary>
/// </summary>
public UserDailyRestrain()
: base(AccessLevel.ReadWrite)
{
}
/// <summary>
/// </summary>
public UserDailyRestrain(int userId)
: this()
{
_userId = userId;
_restrainProperty = new RestrainProperty();
}
#region 自动生成属性
private int _userId;
/// <summary>
///
/// </summary>
[ProtoMember(1)]
[EntityField("UserId", IsKey = true)]
public int UserId
{
get
{
return _userId;
}
set
{
SetChange("UserId", value);
}
}
private DateTime _refreshDate;
/// <summary>
///
/// </summary>
[ProtoMember(2)]
[EntityField("RefreshDate")]
public DateTime RefreshDate
{
get
{
return _refreshDate;
}
set
{
SetChange("RefreshDate", value);
}
}
private RestrainProperty _restrainProperty;
/// <summary>
/// 玩家限制属性[RestrainProperty]
/// </summary>
[ProtoMember(3)]
[EntityField("RestrainProperty", IsJsonSerialize = true, DbType = ColumnDbType.Text)]
public RestrainProperty RestrainProperty
{
get
{
return _restrainProperty;
}
set
{
SetChange("RestrainProperty", value);
}
}
protected override object this[string index]
{
get
{
#region
switch (index)
{
case "UserId": return _userId;
case "RefreshDate": return _refreshDate;
case "RestrainProperty": return _restrainProperty;
default: throw new ArgumentException(string.Format("UserDailyRestrain index[{0}] isn't exist.", index));
}
#endregion
}
set
{
#region
switch (index)
{
case "UserId":
_userId = value.ToInt();
break;
case "RefreshDate":
_refreshDate = value.ToDateTime();
break;
case "RestrainProperty":
_restrainProperty = ConvertCustomField<RestrainProperty>(value, index);
break;
default: throw new ArgumentException(string.Format("UserDailyRestrain index[{0}] isn't exist.", index));
}
#endregion
}
}
#endregion
protected override int GetIdentityId()
{
//设置玩家的UserID
//若要做为全局使用设置类绑定的自定义属性[EntityTable(CacheType.Entity, DbConfig.Config, @TableName, @PeriodTime)]
return UserId;
}
}
} | 27.583333 | 110 | 0.45292 | [
"Unlicense"
] | Jesse1205/Scut | Sample/Doudizhu/Server/src/ZyGames.Doudizhu.Model/DataModel/UserDailyRestrain.cs | 4,182 | C# |
using Android.Content;
using Crosschat.Client.Droid.Infrastructure;
using Crosschat.Client.Model.Contracts;
using Xamarin.Forms;
[assembly: Dependency(typeof(Storage))]
namespace Crosschat.Client.Droid.Infrastructure
{
public class Storage : IStorage
{
private readonly ISharedPreferences _sharedPrefs;
public Storage()
{
_sharedPrefs = Forms.Context.GetSharedPreferences("Settings", FileCreationMode.Private);
}
public void Set<T>(T obj, string key = "")
{
var edit = _sharedPrefs.Edit();
string str = ServiceStack.Text.JsonSerializer.SerializeToString(obj);
edit.PutString(key, str);
edit.Commit();
}
public void Set<T>(ref T field, T obj, string key = "")
{
field = obj;
Set(obj, key);
}
public T Get<T>(string key, T defaultValue = default(T))
{
var str = _sharedPrefs.GetString(key, null);
if (string.IsNullOrEmpty(str))
{
return defaultValue;
}
T value = ServiceStack.Text.JsonSerializer.DeserializeFromString<T>(str);
return value;
}
}
}
| 25.387755 | 100 | 0.580386 | [
"Apache-2.0"
] | CodeFork/CrossChat-Xamarin.Forms | Client/Crosschat.Client.Android/Infrastructure/Storage.cs | 1,246 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Perfon.Interfaces.Notifications;
namespace Perfon.Core.Notifications
{
/// <summary>
/// Event arg for Notification events
/// </summary>
public class ThreshouldNotificationEventArg:EventArgs, IThreshouldNotificationEventArg
{
public string Message { get; private set; }
public ThreshouldNotificationEventArg(string message)
{
Message = message;
}
}
}
| 23.695652 | 90 | 0.697248 | [
"MIT"
] | magsoft2/Perfon.Net | Perfon.Core/Notifications/ThreshouldNotificationEventArg.cs | 547 | C# |
using System;
namespace WebApiReferenceImpl.Core
{
public struct Maybe<T> : IEquatable<Maybe<T>> where T:class
{
private readonly T _value;
public T Value { get { return _value; } }
public bool HasValue { get { return _value != null; } }
public Maybe(T value) : this()
{
_value = value;
}
public static implicit operator Maybe<T>(T value)
{
return new Maybe<T>(value);
}
public static bool operator ==(Maybe<T> maybe, T value)
{
if (maybe._value == null)
{
return false;
}
return maybe._value.Equals(value);
}
public static bool operator !=(Maybe<T> maybe, T value)
{
return !(maybe == value);
}
public static bool operator ==(Maybe<T> first, Maybe<T> second)
{
return first.Equals(second);
}
public static bool operator !=(Maybe<T> first, Maybe<T> second)
{
return !(first == second);
}
public override bool Equals(object obj)
{
if (!(obj is Maybe<T>))
{
return false;
}
var other = (Maybe<T>)obj;
return Equals(other);
}
public bool Equals(Maybe<T> other)
{
if (_value == null && other._value == null)
{
return true;
}
if (_value == null || other._value == null)
{
return false;
}
return _value.Equals(other._value);
}
public override int GetHashCode()
{
return _value.GetHashCode();
}
public override string ToString()
{
if (HasValue)
{
return _value.ToString();
}
return "No value";
}
public T Unwrap()
{
if (HasValue)
return _value;
return default(T);
}
public K Unwrap<K>(Func<T, K> selector)
{
if (HasValue)
{
return selector(_value);
}
return default(K);
}
}
} | 21.798165 | 71 | 0.428872 | [
"MIT"
] | cosoria/WebApiReferenceImpl | src/Core/Maybe.cs | 2,378 | C# |
using System;
using System.Diagnostics;
using Microsoft.VisualStudio.TestTools.UnitTesting;
public static class Forwarders
{
public static void MyAssert(bool b) => Assert.IsTrue(b);
public static void MyAssert2(bool b) => MyAssert(b);
}
class Assertions
{
void M()
{
string s = null;
Debug.Assert(s != null);
Assert.IsNull(s);
Assert.IsNotNull(s);
Assert.IsTrue(s == null);
Assert.IsTrue(s != null);
Assert.IsFalse(s != null);
Assert.IsFalse(s == null);
Forwarders.MyAssert(s == null);
Forwarders.MyAssert2(s == null);
}
void Trivial()
{
Debug.Assert(false);
Debug.Assert(true);
Assert.IsTrue(false);
Assert.IsTrue(true);
Assert.IsFalse(true);
Assert.IsFalse(false);
Forwarders.MyAssert(false);
Forwarders.MyAssert(true);
Forwarders.MyAssert2(false);
Forwarders.MyAssert2(true);
}
}
// semmle-extractor-options: ${testdir}/../../../resources/stubs/Microsoft.VisualStudio.TestTools.UnitTesting.cs
| 25.395349 | 112 | 0.611722 | [
"ECL-2.0",
"Apache-2.0"
] | AlexTereshenkov/ql | csharp/ql/test/library-tests/commons/Assertions/Assertions.cs | 1,092 | C# |
using System;
using System.Collections.Specialized;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Quartz.Simpl;
using Quartz.Spi;
namespace Quartz
{
internal class ServiceCollectionQuartzConfigurator : IServiceCollectionQuartzConfigurator
{
private readonly IServiceCollection services;
private readonly SchedulerBuilder schedulerBuilder;
internal ServiceCollectionQuartzConfigurator(
IServiceCollection collection,
SchedulerBuilder schedulerBuilder)
{
services = collection;
this.schedulerBuilder = schedulerBuilder;
}
IServiceCollection IServiceCollectionQuartzConfigurator.Services => services;
public void UseSimpleTypeLoader()
{
UseTypeLoader<SimpleTypeLoadHelper>();
}
public void SetProperty(string name, string value)
{
schedulerBuilder.SetProperty(name, value);
}
public NameValueCollection Properties => schedulerBuilder.Properties;
public string SchedulerId
{
set => schedulerBuilder.SchedulerId = value;
}
public string SchedulerName
{
set => schedulerBuilder.SchedulerName = value;
}
public void UseInMemoryStore(Action<SchedulerBuilder.InMemoryStoreOptions>? configure = null)
{
schedulerBuilder.UseInMemoryStore(configure);
}
public void UsePersistentStore(Action<SchedulerBuilder.PersistentStoreOptions> configure)
{
schedulerBuilder.UsePersistentStore(configure);
}
public void UseMicrosoftDependencyInjectionJobFactory(Action<JobFactoryOptions>? configure = null)
{
UseJobFactory<MicrosoftDependencyInjectionJobFactory>(configure);
}
public void UseMicrosoftDependencyInjectionScopedJobFactory(Action<JobFactoryOptions>? configure = null)
{
void ScopeConfiguration(JobFactoryOptions options)
{
options.CreateScope = true;
configure?.Invoke(options);
}
UseJobFactory<MicrosoftDependencyInjectionJobFactory>(ScopeConfiguration);
}
public void UseJobFactory<T>(Action<JobFactoryOptions>? configure = null) where T : IJobFactory
{
schedulerBuilder.UseJobFactory<T>();
services.Replace(ServiceDescriptor.Singleton(typeof(IJobFactory), typeof(T)));
if (configure != null)
{
services.Configure<QuartzOptions>(options =>
{
configure(options.JobFactory);
});
};
}
public void UseTypeLoader<T>() where T : ITypeLoadHelper
{
schedulerBuilder.UseTypeLoader<T>();
services.Replace(ServiceDescriptor.Singleton(typeof(ITypeLoadHelper), typeof(T)));
}
public void UseThreadPool<T>(Action<SchedulerBuilder.ThreadPoolOptions>? configure = null) where T : IThreadPool
{
schedulerBuilder.UseThreadPool<T>(configure);
}
public void UseDefaultThreadPool(Action<SchedulerBuilder.ThreadPoolOptions>? configure = null)
{
schedulerBuilder.UseDefaultThreadPool(configure);
}
public void UseZeroSizeThreadPool(Action<SchedulerBuilder.ThreadPoolOptions>? configure = null)
{
schedulerBuilder.UseZeroSizeThreadPool(configure);
}
public void UseDedicatedThreadPool(Action<SchedulerBuilder.ThreadPoolOptions>? configure = null)
{
schedulerBuilder.UseDedicatedThreadPool(configure);
}
public TimeSpan MisfireThreshold
{
set => schedulerBuilder.MisfireThreshold = value;
}
public void AddSchedulerListener<T>() where T : class, ISchedulerListener
{
services.AddSingleton<ISchedulerListener, T>();
}
public void AddJobListener<T>(params IMatcher<JobKey>[] matchers) where T : class, IJobListener
{
services.AddSingleton(new JobListenerConfiguration(typeof(T), matchers));
services.AddSingleton<IJobListener, T>();
}
public void AddTriggerListener<T>(params IMatcher<TriggerKey>[] matchers) where T : class, ITriggerListener
{
services.AddSingleton(new TriggerListenerConfiguration(typeof(T), matchers));
services.AddSingleton<ITriggerListener, T>();
}
}
} | 33.926471 | 120 | 0.648895 | [
"Apache-2.0"
] | KravaNick/quartznet | src/Quartz.Extensions.DependencyInjection/ServiceCollectionQuartzConfigurator.cs | 4,614 | C# |
// Copyright (c) Xenko contributors (https://xenko.com) and Silicon Studio Corp. (https://www.siliconstudio.co.jp)
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
using System;
using Xenko.Core.Assets;
using Xenko.Core;
using Xenko.Core.Diagnostics;
using Xenko.Core.IO;
using Xenko.Assets.Textures;
using Xenko.Importer.Common;
namespace Xenko.Assets.Models
{
public class FbxAssetImporter : ModelAssetImporter
{
static FbxAssetImporter()
{
NativeLibrary.PreloadLibrary("libfbxsdk.dll");
}
// Supported file extensions for this importer
private const string FileExtensions = ".fbx";
private static readonly Guid Uid = new Guid("a15ae42d-42c5-4a3b-9f7e-f8cd91eda595");
public override Guid Id => Uid;
public override string Description => "FBX importer used for creating entities, 3D Models or animations assets";
public override string SupportedFileExtensions => FileExtensions;
/// <inheritdoc/>
public override EntityInfo GetEntityInfo(UFile localPath, Logger logger, AssetImporterParameters importParameters)
{
var meshConverter = new Importer.FBX.MeshConverter(logger);
var entityInfo = meshConverter.ExtractEntity(localPath.FullPath, importParameters.IsTypeSelectedForOutput(typeof(TextureAsset)));
return entityInfo;
}
/// <inheritdoc/>
public override void GetAnimationDuration(UFile localPath, Logger logger, AssetImporterParameters importParameters, out TimeSpan startTime, out TimeSpan endTime)
{
var meshConverter = new Importer.FBX.MeshConverter(logger);
var durationInSeconds = meshConverter.GetAnimationDuration(localPath.FullPath);
startTime = TimeSpan.Zero;
endTime = TimeSpan.FromSeconds(durationInSeconds);
}
}
}
| 38.82 | 169 | 0.704791 | [
"MIT"
] | Aminator/xenko | sources/engine/Xenko.Assets.Models/FbxAssetImporter.cs | 1,941 | C# |
// <auto-generated />
// Built from: hl7.fhir.r5.core version: 4.6.0
// Option: "NAMESPACE" = "fhirCsR5"
using fhirCsR5.Models;
namespace fhirCsR5.ValueSets
{
/// <summary>
/// Performer function of an agent in an imaging study series
/// </summary>
public static class SeriesPerformerFunctionCodes
{
/// <summary>
///
/// </summary>
public static readonly Coding Consultant = new Coding
{
Code = "CON",
Display = "consultant",
System = "http://terminology.hl7.org/CodeSystem/v3-ParticipationType"
};
/// <summary>
///
/// </summary>
public static readonly Coding Performer = new Coding
{
Code = "PRF",
Display = "performer",
System = "http://terminology.hl7.org/CodeSystem/v3-ParticipationType"
};
/// <summary>
///
/// </summary>
public static readonly Coding Referrer = new Coding
{
Code = "REF",
Display = "referrer",
System = "http://terminology.hl7.org/CodeSystem/v3-ParticipationType"
};
/// <summary>
///
/// </summary>
public static readonly Coding SecondaryPerformer = new Coding
{
Code = "SPRF",
Display = "secondary performer",
System = "http://terminology.hl7.org/CodeSystem/v3-ParticipationType"
};
/// <summary>
///
/// </summary>
public static readonly Coding Verifier = new Coding
{
Code = "VRF",
Display = "verifier",
System = "http://terminology.hl7.org/CodeSystem/v3-ParticipationType"
};
};
}
| 25.327869 | 75 | 0.596764 | [
"MIT"
] | FirelyTeam/fhir-codegen | src/Microsoft.Health.Fhir.SpecManager/fhir/R5/ValueSets/SeriesPerformerFunction.cs | 1,545 | C# |
using Atlassian.Stash.Entities;
using Atlassian.Stash.Helpers;
using Atlassian.Stash.Workers;
using System.Threading.Tasks;
using System;
namespace Atlassian.Stash.Api
{
public class Repositories
{
private const string MANY_REPOSITORIES = "rest/api/1.0/projects/{0}/repos";
private const string ONE_REPOSITORY = "rest/api/1.0/projects/{0}/repos/{1}";
private const string MANY_TAGS = "rest/api/1.0/projects/{0}/repos/{1}/tags";
private const string ONE_TAG = "rest/git/1.0/projects/{0}/repos/{1}/tags/{2}";
private const string MANY_FILES = "rest/api/1.0/projects/{0}/repos/{1}/files";
private const string MANY_FILES_FROM_PATH = "rest/api/1.0/projects/{0}/repos/{1}/files/{2}";
private const string ONE_FILE = "rest/api/1.0/projects/{0}/repos/{1}/browse/{2}";
private const string ONE_FILE_FROM_BRANCH = "rest/api/1.0/projects/{0}/repos/{1}/browse/{2}?at=refs%2Fheads%2F{3}";
private const string MANY_HOOKS = "rest/api/1.0/projects/{0}/repos/{1}/settings/hooks";
private const string PULLREQUEST_SETTINGS = "rest/api/1.0/projects/{0}/repos/{1}/settings/pull-requests";
private const string ONE_HOOK = "rest/api/1.0/projects/{0}/repos/{1}/settings/hooks/{2}";
private const string HOOK_ENABLE = "rest/api/1.0/projects/{0}/repos/{1}/settings/hooks/{2}/enabled";
private const string HOOK_SETTINGS = "rest/api/1.0/projects/{0}/repos/{1}/settings/hooks/{2}/settings";
private const string PERMISSION_GROUPS = ONE_REPOSITORY + "/permissions/groups";
private const string PERMISSION_GRANT_GROUP = PERMISSION_GROUPS + "?permission={2}&name={3}";
private const string PERMISSION_USERS = ONE_REPOSITORY + "/permissions/users";
private const string PERMISSION_REVOKE_USER = PERMISSION_USERS + "?name={2}";
private const string PERMISSION_GRANT_USER = PERMISSION_USERS + "?permission={2}&name={3}";
private HttpCommunicationWorker _httpWorker;
internal Repositories(HttpCommunicationWorker httpWorker)
{
_httpWorker = httpWorker;
}
public async Task<ResponseWrapper<Repository>> Get(string projectKey, RequestOptions requestOptions = null)
{
string requestUrl = UrlBuilder.FormatRestApiUrl(MANY_REPOSITORIES, requestOptions, projectKey);
ResponseWrapper<Repository> response = await _httpWorker.GetAsync<ResponseWrapper<Repository>>(requestUrl).ConfigureAwait(false);
return response;
}
public async Task<Repository> GetById(string projectKey, string repositorySlug)
{
string requestUrl = UrlBuilder.FormatRestApiUrl(ONE_REPOSITORY, null, projectKey, repositorySlug);
Repository response = await _httpWorker.GetAsync<Repository>(requestUrl).ConfigureAwait(false);
return response;
}
public async Task<Repository> Create(string projectKey, Repository repository)
{
string requestUrl = UrlBuilder.FormatRestApiUrl(MANY_REPOSITORIES, null, projectKey);
Repository response = await _httpWorker.PostAsync<Repository>(requestUrl, repository).ConfigureAwait(false);
return response;
}
public async Task Delete(string projectKey, string repositorySlug)
{
string requestUrl = UrlBuilder.FormatRestApiUrl(ONE_REPOSITORY, null, projectKey, repositorySlug);
await _httpWorker.DeleteAsync(requestUrl).ConfigureAwait(false);
}
public async Task<ResponseWrapper<Permission>> GetGroups(string projectKey, string repositorySlug, RequestOptions requestOptions = null)
{
string requestUrl = UrlBuilder.FormatRestApiUrl(PERMISSION_GROUPS, requestOptions, projectKey, repositorySlug);
ResponseWrapper<Permission> response = await _httpWorker.GetAsync<ResponseWrapper<Permission>>(requestUrl).ConfigureAwait(false);
return response;
}
public async Task GrantGroup(string projectKey, string repository, string group, RepositoryPermissions permission)
{
string requestUrl = UrlBuilder.FormatRestApiUrl(PERMISSION_GRANT_GROUP, null, projectKey, repository, permission.ToString(), group);
await _httpWorker.PutAsync<Object>(requestUrl, new Object()).ConfigureAwait(false);
}
public async Task<ResponseWrapper<Permission>> GetUsers(string projectKey, string repositorySlug, RequestOptions requestOptions = null)
{
string requestUrl = UrlBuilder.FormatRestApiUrl(PERMISSION_USERS, requestOptions, projectKey, repositorySlug);
ResponseWrapper<Permission> response = await _httpWorker.GetAsync<ResponseWrapper<Permission>>(requestUrl).ConfigureAwait(false);
return response;
}
public async Task GrantUser(string projectKey, string repository, string group, RepositoryPermissions permission)
{
string requestUrl = UrlBuilder.FormatRestApiUrl(PERMISSION_GRANT_USER, null, projectKey, repository, permission.ToString(), group);
await _httpWorker.PutAsync<Object>(requestUrl, new Object()).ConfigureAwait(false);
}
public async Task RevokeUser(string projectKey, string repository, string user)
{
string requestUrl = UrlBuilder.FormatRestApiUrl(PERMISSION_REVOKE_USER, null, projectKey, repository, user);
await _httpWorker.DeleteAsync(requestUrl).ConfigureAwait(false);
}
public async Task<ResponseWrapper<Tag>> GetTags(string projectKey, string repositorySlug, RequestOptions requestOptions = null)
{
string requestUrl = UrlBuilder.FormatRestApiUrl(MANY_TAGS, requestOptions, projectKey, repositorySlug);
ResponseWrapper<Tag> response = await _httpWorker.GetAsync<ResponseWrapper<Tag>>(requestUrl).ConfigureAwait(false);
return response;
}
public async Task<Tag> CreateTag(string projectKey, string repositorySlug, Tag tag)
{
string requestUrl = UrlBuilder.FormatRestApiUrl(MANY_TAGS, null, projectKey, repositorySlug);
Tag response = await _httpWorker.PostAsync<Tag>(requestUrl, tag, true).ConfigureAwait(false);
return response;
}
public async Task DeleteTag(string projectKey, string repositorySlug, string tagName)
{
string requestUrl = UrlBuilder.FormatRestApiUrl(ONE_TAG, null, projectKey, repositorySlug, tagName);
await _httpWorker.DeleteAsync(requestUrl).ConfigureAwait(false);
}
public async Task<ResponseWrapper<string>> GetFiles(string projectKey, string repositorySlug, string path, RequestOptions requestOptions = null)
{
string requestUrl = UrlBuilder.FormatRestApiUrl(MANY_FILES_FROM_PATH, false, requestOptions, projectKey, repositorySlug, path);
ResponseWrapper<string> response = await _httpWorker.GetAsync<ResponseWrapper<string>>(requestUrl).ConfigureAwait(false);
return response;
}
public async Task<ResponseWrapper<string>> GetFiles(string projectKey, string repositorySlug, RequestOptions requestOptions = null)
{
string requestUrl = UrlBuilder.FormatRestApiUrl(MANY_FILES, requestOptions, projectKey, repositorySlug);
ResponseWrapper<string> response = await _httpWorker.GetAsync<ResponseWrapper<string>>(requestUrl).ConfigureAwait(false);
return response;
}
public async Task<File> GetFileContents(string projectKey, string repositorySlug, string path, RequestOptions requestOptions = null)
{
// must espace spaces, but can't escape slashes
string requestUrl = UrlBuilder.FormatRestApiUrl(ONE_FILE, false, requestOptions, projectKey, repositorySlug, path);
File response = await _httpWorker.GetAsync<File>(requestUrl).ConfigureAwait(false);
return response;
}
public async Task<File> GetFileContents(string projectKey, string repositorySlug, string path, FileContentsOptions requestOptions)
{
string requestUrl = UrlBuilder.FormatRestApiUrl(ONE_FILE, false, requestOptions, projectKey, repositorySlug, path);
File response = await _httpWorker.GetAsync<File>(requestUrl).ConfigureAwait(false);
return response;
}
public async Task<File> GetFileContents(string projectKey, string repositorySlug, string path, string branch, RequestOptions requestOptions = null)
{
// must escape spaces, but can't escape slashes
string requestUrl = UrlBuilder.FormatRestApiUrl(ONE_FILE_FROM_BRANCH, false, requestOptions, projectKey, repositorySlug, path, branch);
File response = await _httpWorker.GetAsync<File>(requestUrl).ConfigureAwait(false);
return response;
}
public async Task<File> GetFileContents(string projectKey, string repositorySlug, string path, string branch, FileContentsOptions requestOptions)
{
// must escape spaces, but can't escape slashes
string requestUrl = UrlBuilder.FormatRestApiUrl(ONE_FILE_FROM_BRANCH, false, requestOptions, projectKey, repositorySlug, path, branch);
File response = await _httpWorker.GetAsync<File>(requestUrl).ConfigureAwait(false);
return response;
}
public async Task<ResponseWrapper<Hook>> GetHooks(string projectKey, string repositorySlug,RequestOptions requestOptions = null)
{
string requestUrl = UrlBuilder.FormatRestApiUrl(MANY_HOOKS, requestOptions, projectKey, repositorySlug);
ResponseWrapper<Hook> response = await _httpWorker.GetAsync<ResponseWrapper<Hook>>(requestUrl).ConfigureAwait(false);
return response;
}
public async Task<Hook> GetHookById(string projectKey, string repositorySlug, string hookKey)
{
string requestUrl = UrlBuilder.FormatRestApiUrl(ONE_HOOK, null, projectKey, repositorySlug, hookKey);
Hook response = await _httpWorker.GetAsync<Hook>(requestUrl).ConfigureAwait(false);
return response;
}
// todo: extend with hook settings
public async Task<Hook> EnableHook(string projectKey, string repositorySlug, string hookKey)
{
string requestUrl = UrlBuilder.FormatRestApiUrl(HOOK_ENABLE, null, projectKey, repositorySlug, hookKey);
Hook response = await _httpWorker.PutAsync<Hook>(requestUrl, null).ConfigureAwait(false);
return response;
}
public async Task<Hook> DisableHook(string projectKey, string repositorySlug, string hookKey)
{
string requestUrl = UrlBuilder.FormatRestApiUrl(HOOK_ENABLE, null, projectKey, repositorySlug, hookKey);
Hook response = await _httpWorker.DeleteWithResponseContentAsync<Hook>(requestUrl).ConfigureAwait(false);
return response;
}
public async Task<string> ConfigureHook(string projectKey, string repositorySlug, string hookKey)
{
string requestUrl = UrlBuilder.FormatRestApiUrl(HOOK_SETTINGS, null, projectKey, repositorySlug, hookKey);
string response = await _httpWorker.GetAsync(requestUrl).ConfigureAwait(false);
return response;
}
public async Task<string> ConfigureHook(string projectKey, string repositorySlug, string hookKey, string settings)
{
string requestUrl = UrlBuilder.FormatRestApiUrl(HOOK_SETTINGS, null, projectKey, repositorySlug, hookKey);
string response = await _httpWorker.PutAsync(requestUrl, settings).ConfigureAwait(false);
return response;
}
public async Task<PullRequestSettings> GetPullRequestSettings(string projectKey, string repositorySlug)
{
string requestUrl = UrlBuilder.FormatRestApiUrl(PULLREQUEST_SETTINGS, null, projectKey, repositorySlug);
PullRequestSettings response = await _httpWorker.GetAsync<PullRequestSettings>(requestUrl).ConfigureAwait(false);
return response;
}
public async Task<PullRequestSettings> SetPullRequestSettings(string projectKey, string repositorySlug, PullRequestSettings settings)
{
string requestUrl = UrlBuilder.FormatRestApiUrl(PULLREQUEST_SETTINGS, null, projectKey, repositorySlug);
PullRequestSettings response = await _httpWorker.PostAsync<PullRequestSettings>(requestUrl, settings, true).ConfigureAwait(false);
return response;
}
}
public enum RepositoryPermissions
{
REPO_READ,
REPO_WRITE,
REPO_ADMIN
}
}
| 47.3125 | 155 | 0.698889 | [
"MIT"
] | RobertvBraam/StashApiCSharp | src/Atlassian.Stash/Api/Repositories.cs | 12,871 | C# |
using Microsoft.VisualStudio.TestTools.UnitTesting;
using UriJudge.Console.Problem1259;
namespace UriJudge.Tests
{
[TestClass]
public class Problem1259Tests
{
[TestMethod]
public void TestEvenAndOddSort()
{
var result = EvenAndOdd.Sort(new[] { 4, 32, 34, 543, 3456, 654, 567, 87, 6789, 98 });
var expected = new[] { 4, 32, 34, 98, 654, 3456, 6789, 567, 543, 87 };
CollectionAssert.AreEqual(expected, result);
}
}
}
| 27.833333 | 97 | 0.60479 | [
"MIT"
] | fabio-couto/uri-judge | src/UriJudge.Tests/Problem1259Tests.cs | 503 | C# |
using System.Diagnostics;
using System.IO;
using System.Text;
using System.Threading.Tasks;
using BenchmarkDotNet.Attributes;
namespace Microsoft.AspNetCore.WebUtilities
{
public class HttpRequestStreamReaderReadLineBenchmark
{
private MemoryStream _stream;
[Params(200, 1000, 1025, 1600)] // Default buffer length is 1024
public int Length { get; set; }
[GlobalSetup]
public void GlobalSetup()
{
var data = new char[Length];
data[Length - 2] = '\r';
data[Length - 1] = '\n';
_stream = new MemoryStream(Encoding.UTF8.GetBytes(data));
}
[Benchmark]
public async Task<string> ReadLineAsync()
{
var reader = CreateReader();
var result = await reader.ReadLineAsync();
Debug.Assert(result.Length == Length - 2);
return result;
}
[Benchmark]
public string ReadLine()
{
var reader = CreateReader();
var result = reader.ReadLine();
Debug.Assert(result.Length == Length - 2);
return result;
}
[Benchmark]
public HttpRequestStreamReader CreateReader()
{
_stream.Seek(0, SeekOrigin.Begin);
return new HttpRequestStreamReader(_stream, Encoding.UTF8);
}
}
}
| 26.150943 | 73 | 0.57215 | [
"Apache-2.0"
] | 1175169074/aspnetcore | src/Http/WebUtilities/perf/Microbenchmarks/HttpRequestStreamReaderReadLineBenchmark.cs | 1,386 | C# |
// Copyright (c) 2008-2021, Hazelcast, Inc. All Rights Reserved.
//
// Licensed 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.
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Hazelcast.Examples.DistributedObjects
{
// ReSharper disable once UnusedMember.Global
public class MapAsyncExample
{
public static async Task Main(params string[] args)
{
var options = new HazelcastOptionsBuilder()
.With(args)
.WithConsoleLogger()
.Build();
// create an Hazelcast client and connect to a server running on localhost
await using var client = await HazelcastClientFactory.StartNewClientAsync(options);
// get the distributed map from the cluster
await using var map = await client.GetMapAsync<string, string>("simple-example");
// create tasks that add values to the map
var tasks = new List<Task>();
for (var i = 0; i < 100; i++)
{
var key = "key " + i;
var task = map.SetAsync(key, " value " + i).ContinueWith(t => { Console.WriteLine("Added " + key); });
tasks.Add(task);
}
// await all tasks
await Task.WhenAll(tasks.ToArray());
// destroy the map
await client.DestroyAsync(map);
}
}
}
| 35.62963 | 118 | 0.62474 | [
"Apache-2.0"
] | Serdaro/hazelcast-csharp-client | src/Hazelcast.Net.Examples/DistributedObjects/MapAsyncExample.cs | 1,926 | C# |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("MyDownloader.Extension")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Programmmers")]
[assembly: AssemblyProduct("MyDownloader.Extension")]
[assembly: AssemblyCopyright("Copyright © Programmmers 2007")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("1d6ed868-3dc7-4db0-a934-7d01165843ae")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
| 38.916667 | 84 | 0.755175 | [
"MIT"
] | 1alireza32109/NiceHashMiner | src/3rdparty/DownloadManager/MyDownloader.Extension/Properties/AssemblyInfo.cs | 1,404 | C# |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace Microsoft.Xml.Schema
{
using System;
using Microsoft.Xml;
using System.Collections;
using Microsoft.Xml.Serialization;
/// <include file='doc\XmlSchemaAnnotated.uex' path='docs/doc[@for="XmlSchemaAnnotated"]/*' />
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
public class XmlSchemaAnnotated : XmlSchemaObject
{
private string _id;
private XmlSchemaAnnotation _annotation;
private XmlAttribute[] _moreAttributes;
/// <include file='doc\XmlSchemaAnnotated.uex' path='docs/doc[@for="XmlSchemaAnnotated.Id"]/*' />
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
[XmlAttribute("id", DataType = "ID")]
public string Id
{
get { return _id; }
set { _id = value; }
}
/// <include file='doc\XmlSchemaAnnotated.uex' path='docs/doc[@for="XmlSchemaAnnotated.Annotation"]/*' />
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
[XmlElement("annotation", typeof(XmlSchemaAnnotation))]
public XmlSchemaAnnotation Annotation
{
get { return _annotation; }
set { _annotation = value; }
}
/// <include file='doc\XmlSchemaAnnotated.uex' path='docs/doc[@for="XmlSchemaAnnotated.UnhandledAttributes"]/*' />
/// <devdoc>
/// <para>[To be supplied.]</para>
/// </devdoc>
[XmlAnyAttribute]
public XmlAttribute[] UnhandledAttributes
{
get { return _moreAttributes; }
set { _moreAttributes = value; }
}
[XmlIgnore]
internal override string IdAttribute
{
get { return Id; }
set { Id = value; }
}
internal override void SetUnhandledAttributes(XmlAttribute[] moreAttributes)
{
_moreAttributes = moreAttributes;
}
internal override void AddAnnotation(XmlSchemaAnnotation annotation)
{
_annotation = annotation;
}
}
}
| 31.378378 | 122 | 0.578381 | [
"MIT"
] | Bencargs/wcf | src/dotnet-svcutil/lib/src/FrameworkFork/Microsoft.Xml/Xml/schema/XmlSchemaAnnotated.cs | 2,322 | C# |
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.Modularity;
namespace LINGYUN.Abp.WorkflowCore.Persistence.EntityFrameworkCore
{
[DependsOn(typeof(AbpWorkflowCorePersistenceModule))]
[DependsOn(typeof(AbpEntityFrameworkCoreModule))]
public class AbpWorkflowCorePersistenceEntityFrameworkCoreModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAbpDbContext<WorkflowDbContext>(options =>
{
options.AddRepository<PersistedWorkflow, EfCoreWorkflowRepository>();
options.AddRepository<PersistedEvent, EfCoreWorkflowEventRepository>();
options.AddRepository<PersistedExecutionError, EfCoreWorkflowExecutionErrorRepository>();
options.AddRepository<PersistedScheduledCommand, EfCoreWorkflowScheduledCommandRepository>();
options.AddRepository<PersistedSubscription, EfCoreWorkflowEventSubscriptionRepository>();
});
}
}
}
| 46.583333 | 110 | 0.727191 | [
"MIT"
] | ZhaoYis/abp-next-admin | aspnet-core/modules/workflow/LINGYUN.Abp.WorkflowCore.Persistence.EntityFrameworkCore/LINGYUN/Abp/WorkflowCore/Persistence/EntityFrameworkCore/AbpWorkflowCorePersistenceEntityFrameworkCoreModule.cs | 1,120 | C# |
using Microsoft.Extensions.DependencyInjection;
namespace Shamyr.Extensions.DependencyInjection;
public sealed class ScopedAttribute: LifetimeAttribute
{
public ScopedAttribute()
: base(ServiceLifetime.Scoped) { }
}
| 22.9 | 54 | 0.79476 | [
"MIT"
] | prixladi/shamyr-core | src/Shamyr.Extensions/DependencyInjection/ScopedAttribute.cs | 231 | C# |
namespace Core3.Transports.Throughput
{
using NServiceBus.Config;
using NServiceBus.Config.ConfigurationSource;
#region TuningFromConfigurationProvider
public class ProvideConfiguration :
IProvideConfiguration<MsmqTransportConfig>
{
public MsmqTransportConfig GetConfiguration()
{
return new MsmqTransportConfig
{
NumberOfWorkerThreads = 5
};
}
}
#endregion
} | 22.590909 | 54 | 0.613682 | [
"Apache-2.0"
] | A-Franklin/docs.particular.net | Snippets/Core/Core_3/Transports/Throughput/ProvideConfiguration.cs | 478 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using MIMWebClient.Core.PlayerSetup;
using MIMWebClient.Core.Room;
namespace MIMWebClient.Core.Player
{
public class Spells : Skill
{
}
} | 17.428571 | 36 | 0.733607 | [
"MIT"
] | LiamKenneth/ArchaicQuest | MIMWebClient/Core/Player/Spells.cs | 246 | C# |
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace InnovatorAdmin
{
public class StringEnumerableReader : TextReader
{
private int _pos;
private IEnumerator<string> _enum;
private bool _hasMore;
public StringEnumerableReader(IEnumerable<string> value)
{
_enum = value.GetEnumerator();
_hasMore = _enum.MoveNext();
_pos = 0;
}
public override void Close()
{
base.Close();
}
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
if (disposing)
_enum.Dispose();
}
public override int Peek()
{
if (!_hasMore) return -1;
return (int)_enum.Current[_pos];
}
public override int Read()
{
if (!_hasMore) return -1;
var result = (int)_enum.Current[_pos];
_pos++;
if (_pos >= _enum.Current.Length)
{
_hasMore = _enum.MoveNext();
_pos = 0;
}
return result;
}
public override int Read(char[] buffer, int index, int count)
{
if (!_hasMore) return 0;
var totalCopied = 0;
int copyCount;
while (totalCopied < count && _hasMore)
{
copyCount = Math.Min(count - totalCopied, _enum.Current.Length - _pos);
_enum.Current.CopyTo(_pos, buffer, index, copyCount);
totalCopied += copyCount;
index += copyCount;
_pos += copyCount;
// Wrap around
if (_pos >= _enum.Current.Length)
{
_hasMore = _enum.MoveNext();
_pos = 0;
}
}
return totalCopied;
}
public override string ReadLine()
{
if (!_hasMore) return null;
throw new NotSupportedException();
}
public override string ReadToEnd()
{
if (!_hasMore) return null;
var builder = new StringBuilder(_enum.Current.Substring(_pos));
while (_enum.MoveNext())
{
builder.Append(_enum.Current);
}
_hasMore = false;
return builder.ToString();
}
}
}
| 22.655914 | 79 | 0.588514 | [
"MIT"
] | GCAE/InnovatorAdmin | InnovatorAdmin.Api/StringEnumerableReader.cs | 2,109 | C# |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/*public enum PlayerState
{
PS_WALK,
PS_WALK_TURN,
PS_DASH_START,
PS_DASH,
PS_DASH_STOP,
PS_DASH_TURN,
PS_WAVELAND,
PS_AIR_DODGE,
PS_PARRY_START,
PS_PARRY,
PS_ROLL_BACKWARD,
PS_ROLL_FORWARD,
PS_TECH_GROUND,
PS_TECH_BACKWARD,
PS_TECH_FORWARD,
PS_WALL_TECH,
PS_WRAPPED,
PS_FROZEN,
PS_IDLE,
PS_IDLE_AIR,
PS_CROUCH,
PS_JUMPSQUAT,
PS_FIRST_JUMP,
PS_DOUBLE_JUMP,
PS_WALL_JUMP,
PS_LAND,
PS_HITSTUN,
PS_HITSTUN_LAND,
PS_TUMBLE,
PS_PRATFALL,
PS_PRATLAND,
PS_SPAWN,
PS_RESPAWN,
PS_DEAD
}
enum StateCategory
{
SC_HITSTUN,
SC_AIR_NEUTRAL,
SC_AIR_COMMITTED,
SC_GROUND_NEUTRAL,
SC_GROUND_COMMITTED
}*/
//Figure out how variables are going to work for the player
public class CharacterInstance //: RunObject
{
[SerializeField]
private Collider2D ecb;
private void Update()
{
//PhysicsUtil.CorrectMovement();
}
}
| 15.126761 | 60 | 0.673184 | [
"MIT"
] | Yinigma/ArchaiCharacterBuilder | RivalsSim/Assets/Scripts/Emulator/Fighter/RunInstance.cs | 1,076 | C# |
/*
* Copyright 2010-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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.
*/
/*
* Do not modify this file. This file is generated from the apigateway-2015-07-09.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.APIGateway.Model
{
/// <summary>
/// Represents a collection of <a>Model</a> resources.
///
/// <div class="seeAlso"> <a>Method</a>, <a>MethodResponse</a>, <a href="http://docs.aws.amazon.com/apigateway/latest/developerguide/models-mappings.html">Models
/// and Mappings</a> </div>
/// </summary>
public partial class GetModelsResponse : AmazonWebServiceResponse
{
private List<Model> _items = new List<Model>();
private string _position;
/// <summary>
/// Gets and sets the property Items.
/// <para>
/// Gets the current <a>Model</a> resource in the collection.
/// </para>
/// </summary>
public List<Model> Items
{
get { return this._items; }
set { this._items = value; }
}
// Check to see if Items property is set
internal bool IsSetItems()
{
return this._items != null && this._items.Count > 0;
}
/// <summary>
/// Gets and sets the property Position.
/// </summary>
public string Position
{
get { return this._position; }
set { this._position = value; }
}
// Check to see if Position property is set
internal bool IsSetPosition()
{
return this._position != null;
}
}
} | 30.453333 | 166 | 0.617338 | [
"Apache-2.0"
] | Bynder/aws-sdk-net | sdk/src/Services/APIGateway/Generated/Model/GetModelsResponse.cs | 2,284 | C# |
using Castle.DynamicProxy;
using Core.CrossCuttingConcerns.Validation;
using Core.Utilities.Interceptors;
using FluentValidation;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Core.Aspects.Autofac.Validation
{
public class ValidationAspect : MethodInterception //Aspect
{
private Type _validatorType;
public ValidationAspect(Type validatorType)
{
//defensive coding
if (!typeof(IValidator).IsAssignableFrom(validatorType))
{
throw new System.Exception("Bur bir doğrulama sınıfı değil");
}
_validatorType = validatorType;
}
protected override void OnBefore(IInvocation invocation)
{
var validator = (IValidator)Activator.CreateInstance(_validatorType);
var entityType = _validatorType.BaseType.GetGenericArguments()[0];
var entities = invocation.Arguments.Where(t => t.GetType() == entityType);
foreach (var entity in entities)
{
ValidationTool.Validate(validator, entity);
}
}
//Rıdvan Üçdağ
//github.com/ridvanucdag
//linkedin.com/ridvanucdag
}
}
| 30.690476 | 86 | 0.645462 | [
"MIT"
] | ridvanucdag/BackEndNetCoreAPI | Core/Aspects/Autofac/Validation/ValidationAspect.cs | 1,300 | C# |
namespace ProjetoLogin.Apresentacao
{
partial class CadastreSe
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CadastreSe));
this.lblLogin = new System.Windows.Forms.Label();
this.lblSenha = new System.Windows.Forms.Label();
this.lblConfirmarSenha = new System.Windows.Forms.Label();
this.btnCadastrar = new System.Windows.Forms.Button();
this.txbLogin = new System.Windows.Forms.TextBox();
this.txbSenha = new System.Windows.Forms.TextBox();
this.txbConfimarSenha = new System.Windows.Forms.TextBox();
this.textBox1 = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.pictureBox3 = new System.Windows.Forms.PictureBox();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
this.SuspendLayout();
//
// lblLogin
//
this.lblLogin.AutoSize = true;
this.lblLogin.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblLogin.Location = new System.Drawing.Point(244, 344);
this.lblLogin.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblLogin.Name = "lblLogin";
this.lblLogin.Size = new System.Drawing.Size(50, 20);
this.lblLogin.TabIndex = 0;
this.lblLogin.Text = "Login";
//
// lblSenha
//
this.lblSenha.AutoSize = true;
this.lblSenha.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblSenha.Location = new System.Drawing.Point(244, 397);
this.lblSenha.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblSenha.Name = "lblSenha";
this.lblSenha.Size = new System.Drawing.Size(56, 20);
this.lblSenha.TabIndex = 1;
this.lblSenha.Text = "Senha";
//
// lblConfirmarSenha
//
this.lblConfirmarSenha.AutoSize = true;
this.lblConfirmarSenha.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblConfirmarSenha.Location = new System.Drawing.Point(244, 453);
this.lblConfirmarSenha.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblConfirmarSenha.Name = "lblConfirmarSenha";
this.lblConfirmarSenha.Size = new System.Drawing.Size(135, 20);
this.lblConfirmarSenha.TabIndex = 2;
this.lblConfirmarSenha.Text = "Confirmar Senha";
//
// btnCadastrar
//
this.btnCadastrar.BackColor = System.Drawing.Color.Teal;
this.btnCadastrar.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnCadastrar.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnCadastrar.ForeColor = System.Drawing.Color.White;
this.btnCadastrar.Location = new System.Drawing.Point(288, 523);
this.btnCadastrar.Margin = new System.Windows.Forms.Padding(4);
this.btnCadastrar.Name = "btnCadastrar";
this.btnCadastrar.Size = new System.Drawing.Size(121, 44);
this.btnCadastrar.TabIndex = 3;
this.btnCadastrar.Text = "Cadastrar";
this.btnCadastrar.UseVisualStyleBackColor = false;
this.btnCadastrar.Click += new System.EventHandler(this.btnCadastrar_Click);
//
// txbLogin
//
this.txbLogin.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txbLogin.Location = new System.Drawing.Point(248, 364);
this.txbLogin.Margin = new System.Windows.Forms.Padding(4);
this.txbLogin.Name = "txbLogin";
this.txbLogin.Size = new System.Drawing.Size(215, 26);
this.txbLogin.TabIndex = 4;
//
// txbSenha
//
this.txbSenha.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txbSenha.Location = new System.Drawing.Point(248, 423);
this.txbSenha.Margin = new System.Windows.Forms.Padding(4);
this.txbSenha.Name = "txbSenha";
this.txbSenha.PasswordChar = '*';
this.txbSenha.Size = new System.Drawing.Size(215, 26);
this.txbSenha.TabIndex = 5;
//
// txbConfimarSenha
//
this.txbConfimarSenha.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txbConfimarSenha.Location = new System.Drawing.Point(248, 473);
this.txbConfimarSenha.Margin = new System.Windows.Forms.Padding(4);
this.txbConfimarSenha.Name = "txbConfimarSenha";
this.txbConfimarSenha.PasswordChar = '*';
this.txbConfimarSenha.Size = new System.Drawing.Size(215, 26);
this.txbConfimarSenha.TabIndex = 6;
//
// textBox1
//
this.textBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.textBox1.Location = new System.Drawing.Point(248, 306);
this.textBox1.Margin = new System.Windows.Forms.Padding(4);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(215, 26);
this.textBox1.TabIndex = 8;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(244, 286);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(57, 20);
this.label1.TabIndex = 7;
this.label1.Text = "E-mail";
//
// pictureBox1
//
this.pictureBox1.BackColor = System.Drawing.SystemColors.Control;
this.pictureBox1.Image = global::ProjetoLogin.Properties.Resources.ImagemTela;
this.pictureBox1.Location = new System.Drawing.Point(273, 71);
this.pictureBox1.Margin = new System.Windows.Forms.Padding(4);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(170, 202);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox1.TabIndex = 9;
this.pictureBox1.TabStop = false;
//
// pictureBox3
//
this.pictureBox3.Dock = System.Windows.Forms.DockStyle.Fill;
this.pictureBox3.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox3.Image")));
this.pictureBox3.Location = new System.Drawing.Point(0, 0);
this.pictureBox3.Margin = new System.Windows.Forms.Padding(4);
this.pictureBox3.Name = "pictureBox3";
this.pictureBox3.Size = new System.Drawing.Size(724, 608);
this.pictureBox3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox3.TabIndex = 12;
this.pictureBox3.TabStop = false;
//
// CadastreSe
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(724, 608);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.label1);
this.Controls.Add(this.txbConfimarSenha);
this.Controls.Add(this.txbSenha);
this.Controls.Add(this.txbLogin);
this.Controls.Add(this.btnCadastrar);
this.Controls.Add(this.lblConfirmarSenha);
this.Controls.Add(this.lblSenha);
this.Controls.Add(this.lblLogin);
this.Controls.Add(this.pictureBox3);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Margin = new System.Windows.Forms.Padding(4);
this.Name = "CadastreSe";
this.Text = "Cadastre-se";
this.Load += new System.EventHandler(this.CadastreSe_Load);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label lblLogin;
private System.Windows.Forms.Label lblSenha;
private System.Windows.Forms.Label lblConfirmarSenha;
private System.Windows.Forms.Button btnCadastrar;
private System.Windows.Forms.TextBox txbLogin;
private System.Windows.Forms.TextBox txbSenha;
private System.Windows.Forms.TextBox txbConfimarSenha;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.PictureBox pictureBox3;
}
} | 53.260664 | 179 | 0.616035 | [
"MIT"
] | Douglas1303/Frota_de_veiculos | Apresentacao/CadastreSe.Designer.cs | 11,240 | C# |
namespace Signum.Upgrade.Upgrades;
class Upgrade_20210924_RemoveParentTokenParentValue : CodeUpgradeBase
{
public override string Description => "Remove parentToken / parentValue from FindOptions";
public override void Execute(UpgradeContext uctx)
{
Regex regex = new Regex(@"parentToken\s*:\s*(?<parentToken>[^,]+),(\s|\n)+parentValue\s*:\s*(?<parentValue>[^,}\r\n]+)");
uctx.ForeachCodeFile(@"*.ts, *.tsx", file =>
{
file.Replace(regex, r => $"filterOptions: [{{ token: {r.Groups["parentToken"]}, value: {r.Groups["parentValue"]}}}] ");
});
}
}
| 36.823529 | 132 | 0.616613 | [
"MIT"
] | Faridmehr/framework | Signum.Upgrade/Upgrades/Upgrade_20210924_RemoveParentTokenParentValue.cs | 626 | C# |
// Copyright (c) Aksio Insurtech. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace Aksio.Cratis.Models;
/// <summary>
/// Attribute that can be adorned a model type as metadata to indicate the actual name of the model.
/// </summary>
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
public sealed class ModelNameAttribute : Attribute
{
/// <summary>
/// Gets the name of the model.
/// </summary>
public string Name { get; }
/// <summary>
/// Initializes a new instance of the <see cref="ModelNameAttribute"/> class.
/// </summary>
/// <param name="name">Name of the model.</param>
public ModelNameAttribute(string name)
{
Name = name;
}
}
| 30.538462 | 101 | 0.676322 | [
"MIT"
] | aksio-insurtech/Cratis | Source/Fundamentals/Models/ModelNameAttribute.cs | 794 | C# |
using System;
using Amazon.SQS.Model;
using JustSaying.Messaging.Channels.Context;
using JustSaying.Messaging.MessageHandling;
using JustSaying.Messaging.Middleware;
using JustSaying.UnitTests.Messaging.Channels.Fakes;
namespace JustSaying.UnitTests.Messaging.Middleware
{
public static class TestHandleContexts
{
public static HandleMessageContext From<TMessage>(TMessage message = default, string queueName = null)
where TMessage : JustSaying.Models.Message, new()
{
return new HandleMessageContext(
queueName ?? "test-queue",
new Message(),
message ?? new TMessage(),
typeof(TMessage),
new FakeVisbilityUpdater(),
new FakeMessageDeleter(),
new Uri("http://test-queue"),
new MessageAttributes());
}
}
}
| 32.962963 | 110 | 0.635955 | [
"Apache-2.0"
] | martincostello/JustSaying | tests/JustSaying.UnitTests/Messaging/Middleware/TestHandleMessageContextBuilder.cs | 890 | C# |
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Text;
using System.Windows.Forms;
using IdSharp.Common.Utils;
using IdSharp.Tagging.ID3v1;
namespace IdSharp.Tagging.Mpeg4
{
/// <summary>
/// MPEG-4
/// </summary>
internal class Mpeg4Tag : INotifyPropertyChanged
{
static Mpeg4Tag()
{
MessageBox.Show("WARNING: Mpeg4Tag class is KNOWN to NOT WORK.");
}
// MAJOR TODO: REMOVES ELEMENTS IT DOESN'T KNOW ABOUT. BAD.
// THIS CLASS DOES NOT WORK. DON'T USE IT. PLEASE CONTRIBUTE IF YOU CAN GET IT TO WORK :)
private const int TAGSIZE = 750;
private static readonly string[] ATOM_TYPES = new[]{"moov", "trak", "udta", "tref", "imap", "mdia",
"minf", "stbl", "edts", "mdra", "rmra", "imag", "vnrp", "dinf" };
private static readonly byte[] FREE_BYTES = Encoding.ASCII.GetBytes("free");
private readonly byte[] udta = new byte[] { 0, 0, 0, 0, (byte)'u', (byte)'d', (byte)'t', (byte)'a' };
private readonly byte[] meta = new byte[] { 0, 0, 0, 0, (byte)'m', (byte)'e', (byte)'t', (byte)'a', 0, 0, 0, 0 };
private readonly byte[] hdlr = new byte[]{0,0,0,0,(byte)'h',(byte)'d',(byte)'l',(byte)'r',0,0,0,0,0,0,0,0,(byte)'m',(byte)'d',(byte)'i',(byte)'r',
(byte)'a',(byte)'p',(byte)'p',(byte)'l',0,0,0,0,0,0,0,0,0};// removed: ,0
private readonly byte[] ilst = new byte[] { 0, 0, 0, 0, (byte)'i', (byte)'l', (byte)'s', (byte)'t' };
private readonly byte[] cnam = new byte[] { 0, 0, 0, 0, (byte)'©', (byte)'n', (byte)'a', (byte)'m', 0, 0, 0, 0, (byte)'d', (byte)'a', (byte)'t', (byte)'a', 0, 0, 0, 1, 0, 0, 0, 0 };
private readonly byte[] cart = new byte[] { 0, 0, 0, 0, (byte)'©', (byte)'A', (byte)'R', (byte)'T', 0, 0, 0, 0, (byte)'d', (byte)'a', (byte)'t', (byte)'a', 0, 0, 0, 1, 0, 0, 0, 0 };
private readonly byte[] calb = new byte[] { 0, 0, 0, 0, (byte)'©', (byte)'a', (byte)'l', (byte)'b', 0, 0, 0, 0, (byte)'d', (byte)'a', (byte)'t', (byte)'a', 0, 0, 0, 1, 0, 0, 0, 0 };
//private readonly byte[] gnre = new byte[] { 0, 0, 0, 0, (byte)'g', (byte)'n', (byte)'r', (byte)'e', 0, 0, 0, 0, (byte)'d', (byte)'a', (byte)'t', (byte)'a', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
private readonly byte[] cgen = new byte[] { 0, 0, 0, 0, (byte)'©', (byte)'g', (byte)'e', (byte)'n', 0, 0, 0, 0, (byte)'d', (byte)'a', (byte)'t', (byte)'a', 0, 0, 0, 1, 0, 0, 0, 0 };
private readonly byte[] trkn = new byte[]{0,0,0,0,(byte)'t',(byte)'r',(byte)'k',(byte)'n',0,0,0,0,(byte)'d',(byte)'a',(byte)'t',(byte)'a',0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0};
private readonly byte[] disk = new byte[]{0,0,0,0,(byte)'d',(byte)'i',(byte)'s',(byte)'k',0,0,0,0,(byte)'d',(byte)'a',(byte)'t',(byte)'a',0,0,0,0,0,0,0,0,0,0,
0,1,0,1};
private readonly byte[] cday = new byte[] { 0, 0, 0, 0, (byte)'©', (byte)'d', (byte)'a', (byte)'y', 0, 0, 0, 0, (byte)'d', (byte)'a', (byte)'t', (byte)'a', 0, 0, 0, 1, 0, 0, 0, 0 };
private readonly byte[] cpil = new byte[] { 0, 0, 0, 0, (byte)'c', (byte)'p', (byte)'i', (byte)'l', 0, 0, 0, 0, (byte)'d', (byte)'a', (byte)'t', (byte)'a', 0, 0, 0, 21, 0, 0, 0, 0, 0 };
private readonly byte[] tmpo = new byte[] { 0, 0, 0, 0, (byte)'t', (byte)'m', (byte)'p', (byte)'o', 0, 0, 0, 0, (byte)'d', (byte)'a', (byte)'t', (byte)'a', 0, 0, 0, 21, 0, 0, 0, 0, 0, 0 };
private readonly byte[] ctoo = new byte[] { 0, 0, 0, 0, (byte)'©', (byte)'t', (byte)'o', (byte)'o', 0, 0, 0, 0, (byte)'d', (byte)'a', (byte)'t', (byte)'a', 0, 0, 0, 1, 0, 0, 0, 0 };
private readonly byte[] ccmt = new byte[] { 0, 0, 0, 0, (byte)'©', (byte)'c', (byte)'m', (byte)'t', 0, 0, 0, 0, (byte)'d', (byte)'a', (byte)'t', (byte)'a', 0, 0, 0, 1, 0, 0, 0, 0 };
private readonly List<Atom> _atoms = new List<Atom>();
private long _moovpos;
private long _udtapos;
private int _udtasize;
private long _freepos;
private int _freesize;
private int _mdatsize;
private string _artist;
private string _album;
private string _title;
private string _genre;
private string _year;
private string _comment;
private string _tool;
private string _composer;
private int _trackNumber;
private int _totalTracks;
private bool _isPartOfCompilation;
private int _bpm;
private int _disc;
private int _totalDiscs;
private int _channels;
private int _frequency;
private string _codec;
//private double _totalSeconds;
private int _samples;
private bool _isWriting = false;
/// <summary>
/// Occurs when a property value changes.
/// </summary>
public event PropertyChangedEventHandler PropertyChanged;
internal Mpeg4Tag(string path)
{
Read(path);
}
/// <summary>
/// Initializes a new instance of the <see cref="Mpeg4Tag"/> class.
/// </summary>
public Mpeg4Tag()
{
}
private class Atom
{
public string name;
public int size;
public long pos;
public int level;
}
private void RaisePropertyChanged(string propertyName)
{
var handler = PropertyChanged;
if (handler != null)
handler(this, new PropertyChangedEventArgs(propertyName));
}
#region <<< Public Properties >>>
/// <summary>
/// Gets or sets the artist.
/// </summary>
/// <value>The artist.</value>
public string Artist
{
get
{
return _artist;
}
set
{
_artist = value;
RaisePropertyChanged("Artist");
}
}
/// <summary>
/// Gets or sets the album.
/// </summary>
/// <value>The album.</value>
public string Album
{
get
{
return _album;
}
set
{
_album = value;
RaisePropertyChanged("Album");
}
}
/// <summary>
/// Gets or sets the title.
/// </summary>
/// <value>The title.</value>
public string Title
{
get
{
return _title;
}
set
{
_title = value;
RaisePropertyChanged("Title");
}
}
/// <summary>
/// Gets or sets the genre.
/// </summary>
/// <value>The genre.</value>
public string Genre
{
get
{
return _genre;
}
set
{
_genre = value;
RaisePropertyChanged("Genre");
}
}
/// <summary>
/// Gets or sets the year.
/// </summary>
/// <value>The year.</value>
public string Year
{
get
{
return _year;
}
set
{
_year = value;
RaisePropertyChanged("Year");
}
}
/// <summary>
/// Gets or sets the comment.
/// </summary>
/// <value>The comment.</value>
public string Comment
{
get
{
return _comment;
}
set
{
_comment = value;
RaisePropertyChanged("Comment");
}
}
/// <summary>
/// Gets or sets the tool.
/// </summary>
/// <value>The tool.</value>
public string Tool
{
get
{
return _tool;
}
set
{
_tool = value;
RaisePropertyChanged("Tool");
}
}
/// <summary>
/// Gets or sets the composer.
/// </summary>
/// <value>The composer.</value>
public string Composer
{
get
{
return _composer;
}
set
{
_composer = value;
RaisePropertyChanged("Composer");
}
}
/// <summary>
/// Gets or sets the track number.
/// </summary>
/// <value>The track number.</value>
public int TrackNumber
{
get
{
return _trackNumber;
}
set
{
_trackNumber = value;
RaisePropertyChanged("TrackNumber");
}
}
/// <summary>
/// Gets or sets the total tracks.
/// </summary>
/// <value>The total tracks.</value>
public int TotalTracks
{
get
{
return _totalTracks;
}
set
{
_totalTracks = value;
RaisePropertyChanged("TotalTracks");
}
}
/// <summary>
/// Gets or sets a value indicating whether this instance is compilation.
/// </summary>
/// <value>
/// <c>true</c> if this instance is compilation; otherwise, <c>false</c>.
/// </value>
public bool IsPartOfCompilation
{
get
{
return _isPartOfCompilation;
}
set
{
_isPartOfCompilation = value;
RaisePropertyChanged("IsPartOfCompilation");
}
}
/// <summary>
/// Gets or sets the BPM.
/// </summary>
/// <value>The BPM.</value>
public int BPM
{
get
{
return _bpm;
}
set
{
_bpm = value;
RaisePropertyChanged("BPM");
}
}
/// <summary>
/// Gets or sets the disc.
/// </summary>
/// <value>The disc.</value>
public int Disc
{
get
{
return _disc;
}
set
{
_disc = value;
RaisePropertyChanged("Disc");
}
}
/// <summary>
/// Gets or sets the total discs.
/// </summary>
/// <value>The total discs.</value>
public int TotalDiscs
{
get
{
return _totalDiscs;
}
set
{
_totalDiscs = value;
RaisePropertyChanged("TotalDiscs");
}
}
#endregion <<< Public Properties >>>
#region <<< Internal Properties >>>
internal int MdatAtomSize
{
get { return _mdatsize; }
}
internal int Samples
{
get { return _samples; }
private set
{
_samples = value;
RaisePropertyChanged("Samples");
}
}
internal int Channels
{
get { return _channels; }
private set
{
_channels = value;
RaisePropertyChanged("Channels");
}
}
internal int Frequency
{
get { return _frequency; }
private set
{
_frequency = value;
RaisePropertyChanged("Frequency");
}
}
internal string Codec
{
get { return _codec; }
private set
{
_codec = value;
RaisePropertyChanged("Codec");
}
}
/*internal Double TotalSeconds
{
get { return m_TotalSeconds; }
private set
{
m_TotalSeconds = value;
FirePropertyChanged("TotalSeconds");
}
}*/
#endregion <<< Internal Properties >>>
private void ParseTag(string key, byte[] data, int size)
{
if (_isWriting) return;
if (string.Compare(key, "©nam", true) == 0)
{
Title = Encoding.UTF8.GetString(data, 0, size);
}
else if (string.Compare(key, "©ART", true) == 0)
{
Artist = Encoding.UTF8.GetString(data, 0, size);
}
else if (string.Compare(key, "©alb", true) == 0)
{
Album = Encoding.UTF8.GetString(data, 0, size);
}
else if (string.Compare(key, "©cmt", true) == 0)
{
Comment = Encoding.UTF8.GetString(data, 0, size);
}
else if (string.Compare(key, "©day", true) == 0)
{
Year = Encoding.UTF8.GetString(data, 0, size);
}
else if (string.Compare(key, "©too", true) == 0)
{
Tool = Encoding.UTF8.GetString(data, 0, size);
}
else if (string.Compare(key, "gnre", true) == 0)
{
if (string.IsNullOrEmpty(Genre))
{
int genreIndex = data[1];
if (genreIndex != 0)
{
Genre = GenreHelper.GenreByIndex[genreIndex - 1];
}
}
}
else if (string.Compare(key, "©gen", true) == 0)
{
Genre = Encoding.UTF8.GetString(data, 0, size);
}
else if (string.Compare(key, "trkn", true) == 0)
{
TrackNumber = data[3];
TotalTracks = data[5];
}
else if (string.Compare(key, "disk", true) == 0)
{
Disc = data[3];
TotalDiscs = data[5];
}
else if (string.Compare(key, "©wrt", true) == 0)
{
Composer = Encoding.UTF8.GetString(data, 0, size);
}
else if (string.Compare(key, "cpil", true) == 0)
{
IsPartOfCompilation = (data[0] == 1);
}
else if (string.Compare(key, "tmpo", true) == 0)
{
BPM = data[1] + (data[0] << 8);
}
else
{
// TODO: Save unknown keys
Console.WriteLine(key);
}
}
private static int ReadInt32(byte[] data, int offset)
{
int n;
n = (data[offset] & 0xff) << 24;
n += (data[offset + 1] & 0xff) << 16;
n += (data[offset + 2] & 0xff) << 8;
n += (data[offset + 3] & 0xff);
return n;
}
private void ParseStsdAtom(byte[] atomdata)
{
byte[] data_format = new byte[4];
byte[] encoder_vendor = new byte[4];
int num = ReadInt32(atomdata, 4);
int stsdOff = 8;
for (int i = 0; i < num; i++)
{
int size = ReadInt32(atomdata, stsdOff);
stsdOff += 4;
Buffer.BlockCopy(atomdata, stsdOff, data_format, 0, 4);
stsdOff += 12;
byte[] data = new byte[size - 4 - 12];
Buffer.BlockCopy(atomdata, stsdOff, data, 0, (size - 4 - 12));
stsdOff += (size - 4 - 12);
Buffer.BlockCopy(data, 4, encoder_vendor, 0, 4);
if (encoder_vendor[0] == 0)
{
Frequency = ((data[16] & 0xff) << 8) + (data[17] & 0xff);
Channels = (data[8] << 8) + data[9];
if (ByteUtils.Compare(data_format, Encoding.ASCII.GetBytes("mp4a")))
{
Codec = "AAC";
}
else
{
Codec = Encoding.UTF8.GetString(data_format);
}
}
}
}
private void ParseAtom(Stream stream, long firstOffset, long stopAt, int level)
{
++level;
long end = stream.Length;
long offset = firstOffset;
while (offset < stopAt)
{
stream.Seek(offset, SeekOrigin.Begin);
int atomsize = stream.ReadInt32();
string atomname = ByteUtils.ISO88591.GetString(stream.Read(4));
if ((offset + atomsize) > end)
{
throw new InvalidDataException(string.Format("atom at {0} claims {1} bytes, end = {2}", offset, atomsize, end));
}
Atom atom = new Atom();
atom.name = atomname;
atom.size = atomsize;
atom.pos = stream.Position - 8;
atom.level = level;
_atoms.Add(atom);
if (string.Compare(atomname, "mdat", true) == 0)
{
_mdatsize = atomsize;
}
else if (string.Compare(atomname, "moov", true) == 0)
{
_moovpos = stream.Position - 8;
}
else if (string.Compare(atomname, "udta", true) == 0)
{
_udtapos = stream.Position - 8;
_udtasize = atomsize;
}
else if (string.Compare(atomname, "free", true) == 0)
{
// we'd like a free under a moov
// so check for level = 1
if (atom.level == 2)
{
// go backwards through the entries
for (int i = _atoms.Count - 1; i > 0; i--)
{
// until we hit a level 1
if (_atoms[i].level == 1)
{
if (string.Compare(_atoms[i].name, "moov", true) == 0)
{
if (atomsize > _freesize)
{
// is this free bigger than others?
_freepos = stream.Position - 8;
_freesize = atomsize;
}
else
{
break;
}
} // if moov
} // if level = 1
} // for
} // if level = 2
} // if free
// if it's a container atom, parse the contents of the atom
foreach (string atomType in ATOM_TYPES)
{
if (string.Compare(atomname, atomType, true) == 0)
{
ParseAtom(stream, stream.Position, offset + atomsize, level);
break;
}
}
// meta atom contains tags and some other data
if (string.Compare(atomname, "meta", true) == 0)
{
// read in meta atom
byte[] atomdata = stream.Read(atomsize - 8);
int nextTagPosition = 0;
for (int i = 0; i < atomdata.Length - 4; i++)
{
// ilst
if (atomdata[i] == 'i' && atomdata[i + 1] == 'l' && atomdata[i + 2] == 's' && atomdata[i + 3] == 't')
{
nextTagPosition = i + 8;
break;
}
}
while (nextTagPosition < (atomsize - 4) && nextTagPosition > 8)
{
int size = ReadInt32(atomdata, (nextTagPosition - 4)) - 4;
if (size < 20)
{
Console.WriteLine(stream.Position); // TODO: Why is this here...
}
byte[] keyBytes = new byte[4];
byte[] data = new byte[size - 20];
Buffer.BlockCopy(atomdata, nextTagPosition, keyBytes, 0, 4);
Buffer.BlockCopy(atomdata, nextTagPosition + 20, data, 0, size - 20);
string key = ByteUtils.ISO88591.GetString(keyBytes);
nextTagPosition += size + 4;
ParseTag(key, data, size - 20);
}
} // if meta
// mdhd has data for calculating playtime
if (string.Compare(atomname, "mdhd", true) == 0)
{
stream.Seek(12, SeekOrigin.Current);
Frequency = stream.ReadInt32();
Samples = stream.ReadInt32();
}
// stsd has data for sample, channels and codec
if (string.Compare(atomname, "stsd", true) == 0)
{
byte[] atomdata = stream.Read(atomsize - 8);
ParseStsdAtom(atomdata);
}
// bump offest and continue
if (atomsize == 0)
{
// a 0 byte atom is the end
offset = stopAt;
}
else
{
offset += atomsize;
}
} // while
--level;
}
private static void WriteInt32(int num, Stream stream, int offset)
{
long oldPosition = stream.Position;
stream.Position = offset;
stream.WriteByte((byte)((num >> 24) & 0xff));
stream.WriteByte((byte)((num >> 16) & 0xff));
stream.WriteByte((byte)((num >> 8) & 0xff));
stream.WriteByte((byte)((num >> 0) & 0xff));
stream.Position = oldPosition;
}
private static void WriteInt32(int num, byte[] data, int offset)
{
data[offset] = (byte)((num >> 24) & 0xff);
data[offset + 1] = (byte)((num >> 16) & 0xff);
data[offset + 2] = (byte)((num >> 8) & 0xff);
data[offset + 3] = (byte)((num >> 0) & 0xff);
}
private static void WriteAtom(Stream stream, byte[] atom, string value)
{
if (!string.IsNullOrEmpty(value))
{
byte[] byteValue = Encoding.UTF8.GetBytes(value);
WriteInt32(atom.Length + byteValue.Length, atom, 0);
WriteInt32(atom.Length + byteValue.Length - 8, atom, 8);
stream.Write(atom);
stream.Write(byteValue);
}
}
/*private void StoreGenreAtom(Stream stream, Byte genreNum)
{
if (genreNum > 0 && genreNum < 255)
{
store4int(gnre.Length, gnre, 0);
store4int(gnre.Length - 8, gnre, 8);
gnre[gnre.Length - 1] = genreNum;
Utils.Write(stream, gnre);
}
}*/
private void WriteTrackAtom(Stream stream)
{
if (_trackNumber > 0 || _totalTracks > 0)
{
WriteInt32(trkn.Length, trkn, 0);
WriteInt32(trkn.Length - 8, trkn, 8);
trkn[trkn.Length - 5] = (byte)_trackNumber;
trkn[trkn.Length - 3] = (byte)_totalTracks;
stream.Write(trkn);
}
}
private void WriteDiscAtom(Stream stream)
{
if (_disc > 0 || _totalDiscs > 0)
{
WriteInt32(disk.Length, disk, 0);
WriteInt32(disk.Length - 8, disk, 8);
disk[disk.Length - 3] = (byte)_disc;
disk[disk.Length - 1] = (byte)_totalDiscs;
stream.Write(disk);
}
}
private void WriteCompilationAtom(Stream stream)
{
if (_isPartOfCompilation)
{
WriteInt32(cpil.Length, cpil, 0);
WriteInt32(cpil.Length - 8, cpil, 8);
cpil[cpil.Length - 1] = 1;
stream.Write(cpil);
}
}
private void WriteBpmAtom(Stream stream)
{
if (_bpm > 0)
{
WriteInt32(tmpo.Length, tmpo, 0);
WriteInt32(tmpo.Length - 8, tmpo, 8);
WriteInt32(_bpm, tmpo, tmpo.Length - 4);
stream.Write(tmpo);
}
}
private int CreateUDTA(Stream fulltag, int len)
{
fulltag.SetLength(0);
// append each atom to fulltag
// pos serves as a running total of the size of the atom
fulltag.Write(udta);
fulltag.Write(meta);
fulltag.Write(hdlr);
fulltag.Write(ilst);
WriteAtom(fulltag, cnam, _title);
WriteAtom(fulltag, cart, _artist);
WriteAtom(fulltag, calb, _album);
//StoreGenreAtom(fulltag, tag.genrenum);
WriteAtom(fulltag, cgen, _genre);
WriteTrackAtom(fulltag);
WriteDiscAtom(fulltag);
WriteAtom(fulltag, cday, _year);
WriteCompilationAtom(fulltag);
WriteBpmAtom(fulltag);
WriteAtom(fulltag, ctoo, _tool);
WriteAtom(fulltag, ccmt, _comment);
// done with adding tags
// now clean up the atomsizes and perhaps add a free atom
// the free atom gives us some space if we edit tags later
int pos = (int)fulltag.Position;
WriteInt32(pos - 20 - hdlr.Length, fulltag, 20 + hdlr.Length); // size of ilst
if (pos < (len + 8))
{
WriteInt32(len - pos, fulltag, pos);
fulltag.Position = pos + 4;
fulltag.Write(FREE_BYTES);
fulltag.Write(new byte[len - pos - 8]);
pos = len;
}
WriteInt32(pos, fulltag, 0); // size of entire atom at beginning
WriteInt32(pos - 8, fulltag, 8); // size of meta at meta position
WriteInt32(hdlr.Length, fulltag, 20); // size of hdlr at it position
return pos;
}
// take the moov atom and copy it to end
// change original moov atom to free atom
// change atomsize of new moov atom to accomodate new tags
private static bool MoovToEnd(Stream f, int len, long moovpos)
{
if (moovpos == 0)
return false;
f.Seek(moovpos, SeekOrigin.Begin);
int atomsize = f.ReadInt32();
f.Seek(moovpos, SeekOrigin.Begin); // move to start of moov atom
byte[] moov = f.Read(atomsize); // read entire moov atom
f.Seek(moovpos + 4, SeekOrigin.Begin); // back to start of atom
f.Write(FREE_BYTES); // change old moov atom to free
f.Seek(0, SeekOrigin.End); // moov atom to end of file
// todo: atomsize+len isn't making sense.. look into
WriteInt32(atomsize + len, moov, 0); // bump the len of the moov
f.Write(moov); // write the new moov atom
return true;
}
/// <summary>
/// Removes the tag from the specified path.
/// </summary>
/// <param name="path">The path.</param>
public static void Remove(string path)
{
Mpeg4Tag tag = new Mpeg4Tag();
tag.Read(path);
/*if (tag.m_udtapos == 0)
{
Console.Write("no existing tags\n");
}*/
using (FileStream outf = File.Open(path, FileMode.Open, FileAccess.Write, FileShare.None))
{
foreach (Atom atom in tag._atoms)
{
if (string.Compare(atom.name, "udta", true) == 0)
{
outf.Seek(atom.pos + 4, SeekOrigin.Begin);
outf.Write(FREE_BYTES);
}
}
}
}
/// <summary>
/// Writes the tag to the specified path.
/// </summary>
/// <param name="path">The path.</param>
public void Write(string path)
{
throw new NotImplementedException();
/*m_IsWriting = true;
try
{
Read(path);
using (FileStream outf = File.Open(path, FileMode.Open, FileAccess.Write, FileShare.None))
using (MemoryStream fulltag = new MemoryStream())
{
int len = CreateUDTA(fulltag, 0);
// is there an existing udta atom we can overwrite?
// if there's enough room in the atom, overwrite
// if not, change to a free atom
bool wrote = false;
if (m_udtapos != 0)
{
if (len < m_udtasize)
{
// todo: assertions can be done on return value at fi.udtasize
CreateUDTA(fulltag, m_udtasize);
outf.Seek(m_udtapos, SeekOrigin.Begin);
outf.Write(fulltag.ToArray(), 0, m_udtasize);
wrote = true;
}
else
{
outf.Seek(m_udtasize + 4, SeekOrigin.Begin);
Utils.Write(outf, FREE_BYTES);
}
}
// is there an existing free atom we can overwrite?
// if there's enough room in the atom, overwrite
if (!wrote && m_freepos != 0 && len < m_freesize)
{
CreateUDTA(fulltag, m_freesize);
outf.Seek(m_freepos, SeekOrigin.Begin);
outf.Write(fulltag.ToArray(), 0, m_freesize);
wrote = true;
}
// if we didn't overwite an existing udta or free, add to a moov
if (!wrote)
{
len = CreateUDTA(fulltag, TAGSIZE);
MoovToEnd(outf, len, m_moovpos);
Utils.Write(outf, fulltag.ToArray());
}
}
// if we used moovtoend, there is a large free atom. use mpcreator to eliminate it
// if mp4creator60 is not present, nothing happens
// consider using mpeg4ip's optimize - same source as mp4creator
if(wrote == 0) {
sprintf(str, "\"%s\"", outfile);
spawnlp(P_WAIT, "mp4creator60.exe", "mp4creator60.exe",
"-optimize", str, NULL);
}
}
finally
{
m_IsWriting = false;
}*/
}
/// <summary>
/// Reads the tag from the specified path.
/// </summary>
/// <param name="path">The path.</param>
public void Read(string path)
{
using (FileStream fs = File.Open(path, FileMode.Open, FileAccess.Read, FileShare.Read))
{
Read(fs);
}
}
/// <summary>
/// Reads the tag from the specified stream.
/// </summary>
/// <param name="stream">The stream.</param>
public void Read(Stream stream)
{
_atoms.Clear();
_moovpos = 0;
_udtapos = 0;
_udtasize = 0;
_freepos = 0;
_freesize = 0;
_mdatsize = 0;
long end = stream.Length;
ParseAtom(stream, 0, end, 0);
}
//////////////////////////// from libfaad
}
} | 33.67284 | 197 | 0.42762 | [
"MIT"
] | Mapaler/osu-export | IdSharp/IdSharp.Tagging/Mpeg4Tag/Mpeg4Tag.cs | 32,747 | C# |
using System;
using System.Collections.Generic;
using System.Text;
namespace BlazorMonaco.Bridge
{
public class Position
{
public int LineNumber { get; set; }
public int Column { get; set; }
}
public class Range
{
public int StartLineNumber { get; set; }
public int StartColumn { get; set; }
public int EndLineNumber { get; set; }
public int EndColumn { get; set; }
public Range() { }
public Range(int startLineNumber, int startColumn, int endLineNumber, int endColumn)
{
StartLineNumber = startLineNumber;
StartColumn = startColumn;
EndLineNumber = endLineNumber;
EndColumn = endColumn;
}
}
public class Selection : Range
{
public int SelectionStartLineNumber { get; set; }
public int SelectionStartColumn { get; set; }
public int PositionLineNumber { get; set; }
public int PositionColumn { get; set; }
}
public class Dimension
{
public int Width { get; set; }
public int Height { get; set; }
}
public class StandaloneThemeData
{
public string Base { get; set; }
public bool? Inherit { get; set; }
public List<TokenThemeRule> Rules { get; set; }
public List<string> EncodedTokensColors { get; set; }
public Dictionary<string, string> Colors { get; set; }
}
public class TokenThemeRule
{
public string Token { get; set; }
public string Foreground { get; set; }
public string Background { get; set; }
public string FontStyle { get; set; }
}
}
| 27.951613 | 93 | 0.572995 | [
"MIT"
] | BlazorHub/BlazorMonaco | BlazorMonaco/Bridge/Data.cs | 1,735 | C# |
using System.Reflection;
namespace XF.Services
{
public class ServiceRequest
{
private RequestMessage _message;
private byte[] _content;
private object _service;
private bool _sessionValid;
private MethodInfo _serviceMethod;
private object[] _serviceMethodArgs;
private IUserAccount _userAccount;
public ServiceRequest(byte[] content)
{
_content = content;
}
public RequestMessage Message
{
get { return _message; }
set { _message = value; }
}
public byte[] Content
{
get { return _content; }
}
public object Service
{
get { return _service; }
set { _service = value; }
}
public bool ValidSession
{
get { return _sessionValid; }
set { _sessionValid = value; }
}
public MethodInfo ServiceMethod
{
get { return _serviceMethod; }
set { _serviceMethod = value; }
}
public object[] ServiceMethodArgs
{
get { return _serviceMethodArgs; }
set { _serviceMethodArgs = value; }
}
public IUserAccount UserAccount
{
get { return _userAccount; }
set { _userAccount = value; }
}
}
} | 22.262295 | 45 | 0.540501 | [
"MIT"
] | bsimser/xeva | src/Framework.Services/MessageChannel/Server/ServiceRequest.cs | 1,358 | C# |
using System.Collections.Generic;
namespace Subspace.Rtp.Rtcp
{
public class RtcpSourceDescriptionChunk
{
/// <summary>
/// SSRC: 32 bits
///
/// The synchronization source identifier
/// </summary>
public uint SynchronizationSource { get; set; }
public List<RtcpSourceDescriptionItem> Items { get; set; }
}
} | 22.470588 | 66 | 0.604712 | [
"MIT"
] | ztittle/Subspace | src/Subspace.Rtp/Rtcp/RtcpSourceDescriptionChunk.cs | 384 | C# |
// ExcludeFromJSONSerialize
using System;
namespace Leguar.TotalJSON {
/// <summary>
/// Attribute that can be used to exclude single field from JSON serialization. With default serialization settings, this does same as System.NonSerialized attribute.
/// </summary>
[AttributeUsage(AttributeTargets.Field, Inherited = false)]
public sealed class ExcludeFromJSONSerializeAttribute : Attribute {
/// <summary>
/// Constructor for new ExcludeFromJSONSerialize attribute.
/// </summary>
public ExcludeFromJSONSerializeAttribute() {
}
}
}
| 24.347826 | 167 | 0.751786 | [
"MIT"
] | aaaa-trsh/RL-Snakes | Assets/TotalJSON/Scripts/Attributes/ExcludeFromJSONSerializeAttribute.cs | 562 | C# |
using System;
using System.IO;
namespace DotnetCampusP2PFileShare.Core.FileStorage.Signature
{
public class FileSignature
{
/// <summary>
/// 文件签名
/// </summary>
public string GetMd5Sign(FileInfo file)
{
return Md5SecurityUtility.GetMd5HashFromFile(file.FullName);
}
/// <summary>
/// 判断文件签名
/// </summary>
/// <param name="file"></param>
/// <param name="md5"></param>
/// <returns></returns>
public bool CheckMd5Sign(FileInfo file, string md5)
{
return GetMd5Sign(file).Equals(md5, StringComparison.OrdinalIgnoreCase);
}
}
} | 25.37037 | 84 | 0.562044 | [
"MIT"
] | dotnet-campus/dotnetCampus.P2PFileShare | DotnetCampusP2PFileShare/Core/FileStorage/Signature/FileSignature.cs | 707 | C# |
using System;
using System.Collections.Generic;
using System.Dynamic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Xna.Framework;
using Newtonsoft.Json;
using StardewModdingAPI;
using StardewValley;
using StardewValley.Menus;
using System.Runtime.InteropServices;
using Microsoft.Xna.Framework.Input;
using System.Reflection;
using StardewValley.TerrainFeatures;
using StardewValley.Tools;
using static StardewValley.Menus.CoopMenu;
namespace StardewSpeak
{
public static class Utils
{
public static string TrackingIdKey = $"{ModEntry.helper.ModRegistry.ModID}/trackingId";
public static bool IsTileHoeable(GameLocation location, int x, int y)
{
var tile = new Vector2(x, y);
if (location.terrainFeatures.ContainsKey(tile) || location.objects.ContainsKey(tile)) return false;
return location.doesTileHaveProperty((int)tile.X, (int)tile.Y, "Diggable", "Back") != null;
}
public static bool isOnScreen(Vector2 positionTile, int acceptableDistanceFromScreenNonTile, GameLocation location = null)
{
if (location != null && !location.Equals(Game1.currentLocation))
{
return false;
}
if (positionTile.X * 64 > Game1.viewport.X - acceptableDistanceFromScreenNonTile && positionTile.X * 64 < Game1.viewport.X + Game1.viewport.Width + acceptableDistanceFromScreenNonTile && positionTile.Y * 64 > Game1.viewport.Y - acceptableDistanceFromScreenNonTile)
{
return positionTile.Y * 64 < Game1.viewport.Y + Game1.viewport.Height + acceptableDistanceFromScreenNonTile;
}
return false;
}
public static dynamic RectangleToClickableComponent(Rectangle rect, Point mousePosition)
{
bool containsMouse = rect.Contains(mousePosition.X, mousePosition.Y);
return new
{
type = "clickableComponent",
bounds = new { x = rect.X, y = rect.Y, width = rect.Width, height = rect.Height },
center = new List<int> { rect.Center.X, rect.Center.Y },
name = "",
containsMouse,
visible = true,
rect,
};
}
public static dynamic TileToClickableComponent(int x, int y, Point mousePosition)
{
int posX = x * 64 - Game1.viewport.X;
int posY = y * 64 - Game1.viewport.Y;
Rectangle rect = new Rectangle(posX, posY, 64, 64);
return RectangleToClickableComponent(rect, mousePosition);
}
public static bool GetClosestAnimal(Vector2 positionTile, int acceptableDistanceFromScreenNonTile, GameLocation location = null)
{
if (location != null && !location.Equals(Game1.currentLocation))
{
return false;
}
if (positionTile.X * 64 > Game1.viewport.X - acceptableDistanceFromScreenNonTile && positionTile.X * 64 < Game1.viewport.X + Game1.viewport.Width + acceptableDistanceFromScreenNonTile && positionTile.Y * 64 > Game1.viewport.Y - acceptableDistanceFromScreenNonTile)
{
return positionTile.Y * 64 < Game1.viewport.Y + Game1.viewport.Height + acceptableDistanceFromScreenNonTile;
}
return false;
}
public static void WriteJson(string fname, object obj)
{
//var settings = new JsonSerializerSettings() { ReferenceLoopHandling = ReferenceLoopHandling.Ignore };
//settings.Error = (serializer, err) => err.ErrorContext.Handled = true;
//string objStr = JsonConvert.SerializeObject(obj, Formatting.None, settings);
//string path = @"C:\Program Files (x86)\GOG Galaxy\Games\Stardew Valley\Mods\StardewSpeak\StardewSpeak\lib\speech-client\debug\" + fname;
//using (var writetext = new StreamWriter(path))
//{
// writetext.WriteLine(objStr);
//}
}
public static dynamic Merge(object item1, object item2)
{
if (item1 == null || item2 == null)
return item1 ?? item2 ?? new ExpandoObject();
dynamic expando = new ExpandoObject();
var result = expando as IDictionary<string, object>;
foreach (var kvp in IterObject(item1))
{
result[kvp.key] = kvp.value;
}
foreach (var kvp in IterObject(item2))
{
result[kvp.key] = kvp.value;
}
return result;
}
public static List<dynamic> IterObject(dynamic obj) {
var items = new List<dynamic>();
if (obj is ExpandoObject)
{
var exp = obj as ExpandoObject;
foreach (var kvp in exp)
{
items.Add(new { key = kvp.Key, value = kvp.Value });
}
}
else
{
foreach (System.Reflection.PropertyInfo fi in obj.GetType().GetProperties())
{
items.Add(new {
key = fi.Name,
value = fi.GetValue(obj, null)
});
}
}
return items;
}
public static object SerializeMenu(IClickableMenu menu)
{
Point mousePosition = Game1.getMousePosition();
return SerializeMenu(menu, mousePosition);
}
public static object SerializeMenu(IClickableMenu menu, Point mousePosition)
{
dynamic serialized = Menus.SerializeMenu(menu, mousePosition);
if (serialized != null) return serialized;
if (menu == null) return null;
Rectangle menuRect = new Rectangle(menu.xPositionOnScreen, menu.yPositionOnScreen, menu.width, menu.height);
bool containsMouse = menu.isWithinBounds(mousePosition.X, mousePosition.Y);
var menuBarObj = new
{
menu.xPositionOnScreen,
menu.yPositionOnScreen,
upperRightCloseButton = Utils.SerializeClickableCmp(menu.upperRightCloseButton, mousePosition),
containsMouse,
menuType = "unknown",
classType = menu.GetType().ToString(),
};
dynamic menuTypeObj = new { };
if (menu is ShopMenu)
{
var sm = menu as ShopMenu;
var forSale = sm.forSale.Select(x => Utils.SerializeItem((Item)x));
var forSaleButtons = Utils.SerializeComponentList(sm.forSaleButtons, mousePosition);
menuTypeObj = new
{
menuType = "shopMenu",
forSale,
forSaleButtons,
sm.currentItemIndex,
inventory = SerializeMenu(sm.inventory),
upArrow = SerializeClickableCmp(sm.upArrow, mousePosition),
downArrow = SerializeClickableCmp(sm.downArrow, mousePosition),
scrollBar = SerializeClickableCmp(sm.scrollBar, mousePosition),
};
}
else if (menu is ProfileMenu)
{
var pm = menu as ProfileMenu;
var clickableProfileItems = Utils.SerializeComponentList(pm.clickableProfileItems, mousePosition);
menuTypeObj = new
{
menuType = "profileMenu",
backButton = Utils.SerializeClickableCmp(pm.backButton, mousePosition),
forwardButton = Utils.SerializeClickableCmp(pm.forwardButton, mousePosition),
previousCharacterButton = Utils.SerializeClickableCmp(pm.previousCharacterButton, mousePosition),
nextCharacterButton = Utils.SerializeClickableCmp(pm.nextCharacterButton, mousePosition),
clickableProfileItems,
upArrow = SerializeClickableCmp(pm.upArrow, mousePosition),
downArrow = SerializeClickableCmp(pm.downArrow, mousePosition),
};
}
else if (menu is DialogueBox)
{
var db = menu as DialogueBox;
var responseCC = SerializeComponentList(db.responseCC, mousePosition);
var responses = db.responses.Select(x => new { x.responseKey, x.responseText, x.hotkey }).ToList();
menuTypeObj = new
{
menuType = "dialogueBox",
responseCC,
responses,
};
}
else if (menu is CoopMenu)
{
var cb = menu as CoopMenu;
var slotButtons = SerializeComponentList(cb.slotButtons, mousePosition);
String currentTab = Utils.GetPrivateField(cb, "currentTab").ToString();
menuTypeObj = new
{
menuType = "coopMenu",
downArrow = SerializeClickableCmp(cb.downArrow, mousePosition),
hostTab = SerializeClickableCmp(cb.hostTab, mousePosition),
joinTab = SerializeClickableCmp(cb.joinTab, mousePosition),
refreshButton = SerializeClickableCmp(cb.refreshButton, mousePosition),
upArrow = SerializeClickableCmp(cb.upArrow, mousePosition),
slotButtons,
currentTab,
};
if (currentTab == "JOIN_TAB")
{
}
else if (currentTab == "HOST_TAB")
{
}
}
else if (menu is TitleTextInputMenu)
{
var ttim = menu as TitleTextInputMenu;
menuTypeObj = new
{
menuType = "titleTextInputMenu",
doneNamingButton = SerializeClickableCmp(ttim.doneNamingButton, mousePosition),
pasteButton = SerializeClickableCmp(ttim.pasteButton, mousePosition),
textBoxCC = SerializeClickableCmp(ttim.textBoxCC, mousePosition),
};
}
else if (menu is AnimalQueryMenu)
{
var aqm = menu as AnimalQueryMenu;
bool movingAnimal = (bool)Utils.GetPrivateField(aqm, "movingAnimal");
menuTypeObj = new
{
menuType = "animalQueryMenu",
movingAnimal,
};
if (movingAnimal)
{
var vt = VisibleTiles(Game1.getFarm());
var tileComponents = vt.Select(t => TileToClickableComponent(t[0], t[1], mousePosition)).ToList();
var okButton = SerializeClickableCmp(aqm.okButton, mousePosition);
menuTypeObj = Merge(menuTypeObj, new { tileComponents, okButton });
}
else
{
bool confirmingSell = (bool)Utils.GetPrivateField(aqm, "confirmingSell");
if (confirmingSell)
{
var noButton = SerializeClickableCmp(aqm.noButton, mousePosition);
var yesButton = SerializeClickableCmp(aqm.yesButton, mousePosition);
menuTypeObj = Merge(menuTypeObj, new { yesButton, noButton });
}
else
{
menuTypeObj = Merge(menuTypeObj, new
{
allowReproductionButton = SerializeClickableCmp(aqm.allowReproductionButton, mousePosition),
sellButton = SerializeClickableCmp(aqm.sellButton, mousePosition),
textBoxCC = SerializeClickableCmp(aqm.textBoxCC, mousePosition),
moveHomeButton = SerializeClickableCmp(aqm.moveHomeButton, mousePosition),
okButton = SerializeClickableCmp(aqm.okButton, mousePosition),
});
}
}
}
else if (menu is MineElevatorMenu)
{
var mem = menu as MineElevatorMenu;
var elevators = SerializeComponentList(mem.elevators, mousePosition);
menuTypeObj = new
{
menuType = "mineElevatorMenu",
elevators,
};
}
else if (menu is LetterViewerMenu)
{
var lvm = menu as LetterViewerMenu;
var itemsToGrab = SerializeComponentList(lvm.itemsToGrab, mousePosition);
var acceptQuestButton = SerializeClickableCmp(lvm.acceptQuestButton, mousePosition);
var backButton = SerializeClickableCmp(lvm.backButton, mousePosition);
var forwardButton = SerializeClickableCmp(lvm.forwardButton, mousePosition);
menuTypeObj = new
{
menuType = "letterViewerMenu",
acceptQuestButton,
backButton,
forwardButton,
itemsToGrab,
};
}
else if (menu is GameMenu)
{
var gm = menu as GameMenu;
var tabs = Utils.SerializeComponentList(gm.tabs, mousePosition);
var currentPage = Page.SerializePage(gm.pages[gm.currentTab]);
var pages = gm.pages.Select(x => Page.SerializePage(x)).ToList();
menuTypeObj = new
{
menuType = "gameMenu",
currentPage,
tabs,
};
}
else if (menu is InventoryMenu)
{
var im = menu as InventoryMenu;
menuTypeObj = new
{
menuType = "inventoryMenu",
inventory = SerializeComponentList(im.inventory, mousePosition),
im.rows,
im.capacity,
};
}
else if (menu is CarpenterMenu)
{
var cm = menu as CarpenterMenu;
bool onFarm = (bool)Utils.GetPrivateField(cm, "onFarm");
menuTypeObj = new
{
menuType = "carpenterMenu",
cancelButton = SerializeClickableCmp(cm.cancelButton, mousePosition),
onFarm,
};
if (onFarm)
{
var vt = VisibleTiles(Game1.getFarm());
var tileComponents = vt.Select(t => TileToClickableComponent(t[0], t[1], mousePosition)).ToList();
menuTypeObj = Merge(menuTypeObj, new { tileComponents });
}
else
{
menuTypeObj = Merge(menuTypeObj, new
{
backButton = SerializeClickableCmp(cm.backButton, mousePosition),
demolishButton = SerializeClickableCmp(cm.demolishButton, mousePosition),
forwardButton = SerializeClickableCmp(cm.forwardButton, mousePosition),
moveButton = SerializeClickableCmp(cm.moveButton, mousePosition),
okButton = SerializeClickableCmp(cm.okButton, mousePosition),
paintButton = SerializeClickableCmp(cm.paintButton, mousePosition),
upgradeIcon = SerializeClickableCmp(cm.upgradeIcon, mousePosition),
});
}
}
else if (menu is TitleMenu)
{
var tm = menu as TitleMenu;
menuTypeObj = new
{
menuType = "titleMenu",
windowedButton = SerializeClickableCmp(tm.windowedButton, mousePosition),
};
if (TitleMenu.subMenu != null)
{
bool addBackButton = tm.backButton != null && !(TitleMenu.subMenu is CharacterCustomization && !TitleMenu.subMenu.readyToClose());
dynamic backButton = addBackButton ? SerializeClickableCmp(tm.backButton, mousePosition) : null;
var subMenu = Merge(SerializeMenu(TitleMenu.subMenu), new { backButton });
menuTypeObj = Merge(menuTypeObj, new { subMenu });
}
else
{
dynamic subMenu = null;
menuTypeObj = Merge(menuTypeObj, new
{
subMenu,
buttons = SerializeComponentList(tm.buttons, mousePosition),
languageButton = SerializeClickableCmp(tm.languageButton, mousePosition),
aboutButton = SerializeClickableCmp(tm.aboutButton, mousePosition),
muteMusicButton = SerializeClickableCmp(tm.muteMusicButton, mousePosition),
});
}
}
else if (menu is CharacterCustomization)
{
var ccm = menu as CharacterCustomization;
menuTypeObj = new
{
menuType = "characterCustomizationMenu",
};
if (ccm.showingCoopHelp)
{
menuTypeObj = Merge(menuTypeObj, new
{
okButton = SerializeClickableCmp(ccm.coopHelpOkButton, mousePosition),
coopHelpLeftButton = SerializeClickableCmp(ccm.coopHelpLeftButton, mousePosition),
coopHelpRightButton = SerializeClickableCmp(ccm.coopHelpRightButton, mousePosition),
});
}
else
{
menuTypeObj = Merge(menuTypeObj, new
{
advancedOptionsButton = SerializeClickableCmp(ccm.advancedOptionsButton, mousePosition),
backButton = SerializeClickableCmp(ccm.backButton, mousePosition),
cabinLayoutButtons = SerializeComponentList(ccm.cabinLayoutButtons, mousePosition),
coopHelpButton = SerializeClickableCmp(ccm.coopHelpButton, mousePosition),
farmTypeButtons = SerializeComponentList(ccm.farmTypeButtons, mousePosition),
favThingBoxCC = SerializeClickableCmp(ccm.favThingBoxCC, mousePosition),
farmnameBoxCC = SerializeClickableCmp(ccm.farmnameBoxCC, mousePosition),
genderButtons = SerializeComponentList(ccm.genderButtons, mousePosition),
leftSelectionButtons = SerializeComponentList(ccm.leftSelectionButtons, mousePosition),
nameBoxCC = SerializeClickableCmp(ccm.nameBoxCC, mousePosition),
okButton = SerializeClickableCmp(ccm.okButton, mousePosition),
petButtons = SerializeComponentList(ccm.petButtons, mousePosition),
randomButton = SerializeClickableCmp(ccm.randomButton, mousePosition),
rightSelectionButtons = SerializeComponentList(ccm.rightSelectionButtons, mousePosition),
skipIntroButton = SerializeClickableCmp(ccm.skipIntroButton, mousePosition),
});
}
}
else if (menu is QuestLog)
{
var qlm = menu as QuestLog;
StardewValley.Quests.IQuest shownQuest = GetPrivateField(qlm, "_shownQuest");
int currentPage = GetPrivateField(qlm, "currentPage");
int questPage = GetPrivateField(qlm, "questPage");
float contentHeight = GetPrivateField(qlm, "_contentHeight");
float scissorRectHeight = GetPrivateField(qlm, "_scissorRectHeight");
float scrollAmount = GetPrivateField(qlm, "scrollAmount");
List<List<StardewValley.Quests.IQuest>> pages = GetPrivateField(qlm, "pages");
menuTypeObj = new { menuType = "questLogMenu" };
if (questPage == -1)
{
if (pages.Count > 0 && pages[currentPage].Count > 0)
menuTypeObj = Merge(menuTypeObj, new { questLogButtons = SerializeComponentList(qlm.questLogButtons, mousePosition) });
if (currentPage < pages.Count - 1)
menuTypeObj = Merge(menuTypeObj, new { forwardButton = SerializeClickableCmp(qlm.forwardButton, mousePosition) });
if (currentPage > 0)
menuTypeObj = Merge(menuTypeObj, new { backButton = SerializeClickableCmp(qlm.backButton, mousePosition) });
}
else
{
var quest = shownQuest as StardewValley.Quests.Quest;
bool needsScroll = qlm.NeedsScroll();
if (questPage != -1 && shownQuest.ShouldDisplayAsComplete() && shownQuest.HasMoneyReward())
menuTypeObj = Merge(menuTypeObj, new { rewardBox = SerializeClickableCmp(qlm.rewardBox, mousePosition) });
if (questPage != -1 && quest != null && !quest.completed && (bool)quest.canBeCancelled)
menuTypeObj = Merge(menuTypeObj, new { cancelQuestButton = SerializeClickableCmp(qlm.cancelQuestButton, mousePosition) });
if (needsScroll)
{
if (scrollAmount < contentHeight - scissorRectHeight)
menuTypeObj = Merge(menuTypeObj, new { downArrow = SerializeClickableCmp(qlm.downArrow, mousePosition) });
else if (scrollAmount > 0f)
menuTypeObj = Merge(menuTypeObj, new { upArrow = SerializeClickableCmp(qlm.upArrow, mousePosition) });
}
else
{
menuTypeObj = Merge(menuTypeObj, new { backButton = SerializeClickableCmp(qlm.backButton, mousePosition) });
}
}
//backButton = SerializeClickableCmp(qlm.backButton, mousePosition),
//downArrow = SerializeClickableCmp(qlm.downArrow, mousePosition),
//forwardButton = SerializeClickableCmp(qlm.forwardButton, mousePosition),
//questLogButtons = SerializeComponentList(qlm.questLogButtons, mousePosition),
//upArrow = SerializeClickableCmp(qlm.upArrow, mousePosition),
//rewardBox = SerializeClickableCmp(qlm.rewardBox, mousePosition),
}
else if (menu is LanguageSelectionMenu)
{
var lsm = menu as LanguageSelectionMenu;
menuTypeObj = new
{
menuType = "languageSelectionMenu",
languages = SerializeComponentList(lsm.languages, mousePosition),
};
}
else if (menu is LevelUpMenu)
{
var lum = menu as LevelUpMenu;
menuTypeObj = new
{
menuType = "levelUpMenu",
};
if (lum.isProfessionChooser)
{
menuTypeObj = Merge(menuTypeObj, new {
leftProfession = SerializeClickableCmp(lum.leftProfession, mousePosition),
rightProfession = SerializeClickableCmp(lum.rightProfession, mousePosition),
});
}
else
{
menuTypeObj = Merge(menuTypeObj, new
{
okButton = SerializeClickableCmp(lum.okButton, mousePosition)
});
}
}
else if (menu is LoadGameMenu)
{
var lgm = menu as LoadGameMenu;
int currentItemIndex = (int)GetPrivateField(lgm, "currentItemIndex");
menuTypeObj = new
{
menuType = "loadGameMenu",
currentItemIndex,
lgm.deleteConfirmationScreen,
};
if (lgm.deleteConfirmationScreen)
{
menuTypeObj = Utils.Merge(menuTypeObj, new
{
cancelDeleteButton = SerializeClickableCmp(lgm.cancelDeleteButton, mousePosition),
okDeleteButton = SerializeClickableCmp(lgm.okDeleteButton, mousePosition),
});
}
else
{
menuTypeObj = Utils.Merge(menuTypeObj, new
{
deleteButtons = SerializeComponentList(lgm.deleteButtons, mousePosition),
slotButtons = SerializeComponentList(lgm.slotButtons, mousePosition),
upArrow = SerializeClickableCmp(lgm.upArrow, mousePosition),
downArrow = SerializeClickableCmp(lgm.downArrow, mousePosition),
});
}
}
else if (menu is Billboard)
{
var bb = menu as Billboard;
bool dailyQuestBoard = Utils.GetPrivateField(bb, "dailyQuestBoard");
menuTypeObj = new { menuType = "billboard" };
if (dailyQuestBoard)
{
menuTypeObj = Merge(menuTypeObj, new {
acceptQuestButton = SerializeClickableCmp(bb.acceptQuestButton, mousePosition)
});
}
else
{
menuTypeObj = Merge(menuTypeObj, new
{
calendarDays = SerializeComponentList(bb.calendarDays, mousePosition)
});
}
}
else if (menu is LevelUpMenu)
{
var lum = menu as LevelUpMenu;
menuTypeObj = new
{
menuType = "levelUpMenu",
okButton = SerializeClickableCmp(lum.okButton, mousePosition),
rightProfession = SerializeClickableCmp(lum.rightProfession, mousePosition),
leftProfession = SerializeClickableCmp(lum.leftProfession, mousePosition),
lum.isProfessionChooser
};
}
else if (menu is MuseumMenu)
{
var mm = menu as MuseumMenu;
var location = Game1.currentLocation as StardewValley.Locations.LibraryMuseum;
var museumPieceTileComponents =
from t in VisibleTiles(location)
where
location.museumPieces.ContainsKey(new Vector2(t[0], t[1])) ||
location.isTileSuitableForMuseumPiece(t[0], t[1])
select TileToClickableComponent(t[0], t[1], mousePosition);
var inventoryRect = new Rectangle(mm.inventory.xPositionOnScreen, mm.inventory.yPositionOnScreen, mm.inventory.width, mm.inventory.height);
var clickableTileComponents = museumPieceTileComponents.Where(x => !x.rect.Intersects(inventoryRect)).ToList();
menuTypeObj = new
{
menuType = "museumMenu",
okButton = SerializeClickableCmp(mm.okButton, mousePosition),
clickableTileComponents,
inventory = SerializeMenu(mm.inventory),
trashCan = SerializeClickableCmp(mm.trashCan, mousePosition),
};
}
else if (menu is GeodeMenu)
{
var gm = menu as GeodeMenu;
menuTypeObj = new
{
menuType = "geodeMenu",
okButton = SerializeClickableCmp(gm.okButton, mousePosition),
geodeSpot = SerializeClickableCmp(gm.geodeSpot, mousePosition),
inventory = SerializeMenu(gm.inventory),
trashCan = SerializeClickableCmp(gm.trashCan, mousePosition),
};
}
return Utils.Merge(menuBarObj, menuTypeObj);
}
public static List<List<int>> VisibleTiles(GameLocation location)
{
xTile.Map map = location.Map;
int mapWidth = map.Layers[0].LayerWidth;
int mapHeight = map.Layers[0].LayerWidth;
int startX = (Math.Max(Game1.viewport.X, 0) + 63) / 64;
int startY = (Math.Max(Game1.viewport.Y, 0) + 63) / 64;
int endX = Math.Min(Game1.viewport.MaxCorner.X / 64, mapWidth);
int endY = Math.Min(Game1.viewport.MaxCorner.X / 64, mapHeight);
var tiles = new List<List<int>>();
for (int x = startX; x < endX; x++)
{
for (int y = startY; y < endY; y++)
{
var tile = new List<int> { x, y };
tiles.Add(tile);
}
}
return tiles;
}
public static List<object> SerializeComponentList(List<ClickableComponent> components, Point mousePosition)
{
return components?.Select(x => SerializeClickableCmp(x, mousePosition)).ToList();
}
public static List<object> SerializeComponentList(List<ClickableTextureComponent> components, Point mousePosition)
{
return components?.Select(x => SerializeClickableCmp(x, mousePosition)).ToList();
}
public static FarmAnimal FindAnimalByName(string name)
{
var location = Game1.player.currentLocation;
if (location is IAnimalLocation)
{
foreach (FarmAnimal animal in (location as IAnimalLocation).Animals.Values)
{
if (name == animal.Name) return animal;
}
}
return null;
}
public static object SerializeClickableCmp(ClickableComponent cmp, Point mousePosition, bool adjustUiMode = true)
{
if (cmp == null) return null;
Rectangle bounds = cmp.bounds;
bool containsMouse = cmp.containsPoint(mousePosition.X, mousePosition.Y);
var serializedCmp = new
{
type = "clickableComponent",
bounds = new { x = bounds.X, y = bounds.Y, width = bounds.Width, height = bounds.Height },
center = new List<dynamic> { bounds.Center.X, bounds.Center.Y },
cmp.name,
containsMouse,
cmp.visible,
};
if (adjustUiMode)
{
float x = (float)Convert.ToInt32(serializedCmp.center[0]);
float y = (float)Convert.ToInt32(serializedCmp.center[1]);
serializedCmp.center[0] = x * Game1.options.uiScale / Game1.options.zoomLevel;
serializedCmp.center[1] = y * Game1.options.uiScale / Game1.options.zoomLevel;
}
return serializedCmp;
}
public static dynamic GetPrivateField(object obj, string fieldName)
{
var flags = BindingFlags.Public | BindingFlags.NonPublic |
BindingFlags.Static | BindingFlags.Instance;
var type = obj.GetType();
var fi = type.GetField(fieldName, flags);
if (fi != null) return fi.GetValue(obj);
var methodFi = type.GetMethod(fieldName, flags);
if (methodFi != null) return methodFi;
return type.GetProperty(fieldName, flags)?.GetValue(obj);
}
public static MethodInfo GetStaticMethod(Type type, string methodName)
{
MethodInfo info = type.GetMethod(
methodName,
BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy);
return info;
}
public static void SetPrivateField(object obj, string fieldName, dynamic value)
{
var field = obj.GetType().GetField(fieldName, BindingFlags.NonPublic | BindingFlags.Instance);
if (field != null) field.SetValue(obj, value);
}
public static double DistanceBeteenPoints(float x1, float y1, float x2, float y2)
{
float xdiff = Math.Abs(x1 - x2);
float ydiff = Math.Abs(y1 - y2);
return Math.Sqrt((Math.Pow(xdiff, 2) + Math.Pow(ydiff, 2)));
}
public static bool CanPlantOnHoeDirt(HoeDirt hd)
{
Item currentItem = Game1.player.ActiveObject;
if (currentItem == null) return false;
bool equippedFertilizer = currentItem.Category == -19;
// canPlantThisSeedHere fertilizer test doesn't account for existing crops
if (equippedFertilizer)
{
int fertilizer = hd.fertilizer.Value;
bool emptyOrUngrownCrop = hd.crop == null || hd.crop.currentPhase == 0;
return emptyOrUngrownCrop && fertilizer == 0;
}
int objIndex = currentItem.ParentSheetIndex;
Vector2 tileLocation = hd.currentTileLocation;
int tileX = (int)tileLocation.X;
int tileY = (int)tileLocation.Y;
return hd.canPlantThisSeedHere(objIndex, tileX, tileY, false);
}
public static int DistanceBetweenTiles(int x1, int y1, int x2, int y2)
{
int xdiff = Math.Abs(x1 - x2);
int ydiff = Math.Abs(y1 - y2);
return xdiff + ydiff;
}
public static object SerializeItem(Item i)
{
if (i == null) return null;
var player = Game1.player;
dynamic obj = new
{
netName = i.netName.Value,
stack = i.Stack,
displayName = i.DisplayName,
name = i.Name,
type = "",
isTool = false,
};
if (i is Tool)
{
var tool = i as Tool;
var toolLocation = player.GetToolLocation();
int tileX = (int)toolLocation.X / 64;
int tileY = (int)toolLocation.Y / 64;
obj = Utils.Merge(obj, new
{
isTool = true,
upgradeLevel = tool.UpgradeLevel,
power = player.toolPower,
baseName = tool.BaseName,
inUse = player.UsingTool,
tileX,
tileY,
});
}
if (i is MeleeWeapon)
{
var mw = i as MeleeWeapon;
string type = mw.isScythe() ? "scythe" : "meleeWeapon";
obj = Utils.Merge(obj, new { type });
}
else if (i is FishingRod)
{
var fr = i as FishingRod;
obj = Utils.Merge(obj, new
{
fr.castingPower,
fr.isNibbling,
fr.isFishing,
fr.isLostItem,
fr.isReeling,
fr.isTimingCast,
type = "fishingRod",
});
}
else if (i is Axe)
{
obj = Utils.Merge(obj, new { type = "axe" });
}
else if (i is Pickaxe)
{
obj = Utils.Merge(obj, new { type = "pickaxe" });
}
else if (i is WateringCan)
{
obj = Utils.Merge(obj, new { type = "wateringCan" });
}
else if (i is Hoe) obj = Utils.Merge(obj, new { type = "hoe" });
else if (i is MilkPail) obj = Utils.Merge(obj, new { type = "Milk Pail" });
else if (i is Pan) obj = Utils.Merge(obj, new { type = "pan" });
else if (i is Shears) obj = Utils.Merge(obj, new { type = "shears" });
return obj;
}
}
}
| 46.146801 | 276 | 0.527176 | [
"MIT"
] | evfredericksen/StardewSpeak | StardewSpeak/Utils.cs | 36,781 | C# |
#pragma checksum "C:\Users\Willi\OneDrive\Desktop\Code Repository\GymWebsiteApp\GymWebsite\GymWebsite\Areas\Identity\Pages\Account\Manage\_StatusMessage.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "caf0ba0e017fe2d5d40e06cba52017213983ba34"
// <auto-generated/>
#pragma warning disable 1591
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.Areas_Identity_Pages_Account_Manage__StatusMessage), @"mvc.1.0.view", @"/Areas/Identity/Pages/Account/Manage/_StatusMessage.cshtml")]
namespace AspNetCore
{
#line hidden
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
#nullable restore
#line 1 "C:\Users\Willi\OneDrive\Desktop\Code Repository\GymWebsiteApp\GymWebsite\GymWebsite\Areas\Identity\Pages\_ViewImports.cshtml"
using Microsoft.AspNetCore.Identity;
#line default
#line hidden
#nullable disable
#nullable restore
#line 2 "C:\Users\Willi\OneDrive\Desktop\Code Repository\GymWebsiteApp\GymWebsite\GymWebsite\Areas\Identity\Pages\_ViewImports.cshtml"
using GymWebsite.Areas.Identity;
#line default
#line hidden
#nullable disable
#nullable restore
#line 3 "C:\Users\Willi\OneDrive\Desktop\Code Repository\GymWebsiteApp\GymWebsite\GymWebsite\Areas\Identity\Pages\_ViewImports.cshtml"
using GymWebsite.Areas.Identity.Pages;
#line default
#line hidden
#nullable disable
#nullable restore
#line 1 "C:\Users\Willi\OneDrive\Desktop\Code Repository\GymWebsiteApp\GymWebsite\GymWebsite\Areas\Identity\Pages\Account\_ViewImports.cshtml"
using GymWebsite.Areas.Identity.Pages.Account;
#line default
#line hidden
#nullable disable
#nullable restore
#line 1 "C:\Users\Willi\OneDrive\Desktop\Code Repository\GymWebsiteApp\GymWebsite\GymWebsite\Areas\Identity\Pages\Account\Manage\_ViewImports.cshtml"
using GymWebsite.Areas.Identity.Pages.Account.Manage;
#line default
#line hidden
#nullable disable
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"caf0ba0e017fe2d5d40e06cba52017213983ba34", @"/Areas/Identity/Pages/Account/Manage/_StatusMessage.cshtml")]
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"fed6b39a094e9d74464e4b890c777dbcf8553700", @"/Areas/Identity/Pages/_ViewImports.cshtml")]
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"1844c5a32a6a1160dd97352daa9d9440c0d1d2fc", @"/Areas/Identity/Pages/Account/_ViewImports.cshtml")]
[global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"5d3b8748540ae983ae698cc4d0f201bae9c754a2", @"/Areas/Identity/Pages/Account/Manage/_ViewImports.cshtml")]
public class Areas_Identity_Pages_Account_Manage__StatusMessage : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<string>
{
#pragma warning disable 1998
public async override global::System.Threading.Tasks.Task ExecuteAsync()
{
WriteLiteral("\r\n");
#nullable restore
#line 3 "C:\Users\Willi\OneDrive\Desktop\Code Repository\GymWebsiteApp\GymWebsite\GymWebsite\Areas\Identity\Pages\Account\Manage\_StatusMessage.cshtml"
if (!String.IsNullOrEmpty(Model))
{
var statusMessageClass = Model.StartsWith("Error") ? "danger" : "success";
#line default
#line hidden
#nullable disable
WriteLiteral(" <div");
BeginWriteAttribute("class", " class=\"", 144, "\"", 201, 4);
WriteAttributeValue("", 152, "alert", 152, 5, true);
WriteAttributeValue(" ", 157, "alert-", 158, 7, true);
#nullable restore
#line 6 "C:\Users\Willi\OneDrive\Desktop\Code Repository\GymWebsiteApp\GymWebsite\GymWebsite\Areas\Identity\Pages\Account\Manage\_StatusMessage.cshtml"
WriteAttributeValue("", 164, statusMessageClass, 164, 19, false);
#line default
#line hidden
#nullable disable
WriteAttributeValue(" ", 183, "alert-dismissible", 184, 18, true);
EndWriteAttribute();
WriteLiteral(" role=\"alert\">\r\n <button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\"><span aria-hidden=\"true\">×</span></button>\r\n ");
#nullable restore
#line 8 "C:\Users\Willi\OneDrive\Desktop\Code Repository\GymWebsiteApp\GymWebsite\GymWebsite\Areas\Identity\Pages\Account\Manage\_StatusMessage.cshtml"
Write(Model);
#line default
#line hidden
#nullable disable
WriteLiteral("\r\n </div>\r\n");
#nullable restore
#line 10 "C:\Users\Willi\OneDrive\Desktop\Code Repository\GymWebsiteApp\GymWebsite\GymWebsite\Areas\Identity\Pages\Account\Manage\_StatusMessage.cshtml"
}
#line default
#line hidden
#nullable disable
}
#pragma warning restore 1998
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.ViewFeatures.IModelExpressionProvider ModelExpressionProvider { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.IUrlHelper Url { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.IViewComponentHelper Component { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.Rendering.IJsonHelper Json { get; private set; }
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
public global::Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<string> Html { get; private set; }
}
}
#pragma warning restore 1591
| 50.973451 | 244 | 0.768056 | [
"Unlicense"
] | shoreshanked/GymWebsiteApp | GymWebsite/GymWebsite/obj/Debug/net5.0/Razor/Areas/Identity/Pages/Account/Manage/_StatusMessage.cshtml.g.cs | 5,760 | C# |
using System;
using System.Collections.Generic;
using System.IO;
using NUnit.Framework;
using ProtoCore.DSASM.Mirror;
using ProtoCore.Lang;
using ProtoTest.TD;
using ProtoScript.Runners;
using ProtoTestFx.TD;
using System.Linq;
using ProtoCore.AST.AssociativeAST;
using ProtoCore.DSASM;
using ProtoCore.Mirror;
using System.Collections;
namespace ProtoTest.LiveRunner
{
class MemoryConsumptionTests : ProtoTestBase
{
private int instrStreamStart = 0;
private int instrStreamEnd = 0;
ProtoCore.Diagnostics.Runtime runtimeDiagnostics = null;
private ProtoScript.Runners.LiveRunner liverunner = null;
public override void Setup()
{
base.Setup();
liverunner = new ProtoScript.Runners.LiveRunner();
runtimeDiagnostics = new ProtoCore.Diagnostics.Runtime(liverunner.RuntimeCore);
}
public override void TearDown()
{
liverunner.Dispose();
base.TearDown();
}
[Test]
public void TestInstructionStreamMemory_SimpleWorkflow01()
{
List<string> codes = new List<string>()
{
"a = 1;",
"a = 2;"
};
Guid guid = System.Guid.NewGuid();
// First run
// a = 1
List<Subtree> added = new List<Subtree>();
Subtree st = ProtoTestFx.TD.TestFrameWork.CreateSubTreeFromCode(guid, codes[0]);
st.IsInput = true;
added.Add(st);
var syncData = new GraphSyncData(null, added, null);
liverunner.UpdateGraph(syncData);
instrStreamStart = runtimeDiagnostics.GetExecutableInstructionCount();
ProtoCore.Mirror.RuntimeMirror mirror = liverunner.InspectNodeValue("a");
Assert.IsTrue((Int64)mirror.GetData().Data == 1);
// Modify
// a = 2
List<Subtree> modified = new List<Subtree>();
st = ProtoTestFx.TD.TestFrameWork.CreateSubTreeFromCode(guid, codes[1]);
st.IsInput = true;
modified.Add(st);
syncData = new GraphSyncData(null, null, modified);
liverunner.UpdateGraph(syncData);
instrStreamEnd = runtimeDiagnostics.GetExecutableInstructionCount();
mirror = liverunner.InspectNodeValue("a");
Assert.IsTrue((Int64)mirror.GetData().Data == 2);
Assert.AreEqual(instrStreamStart, instrStreamEnd);
}
[Test]
public void TestPeriodicUpdate01()
{
int rhs = 0;
string code = String.Format("a = {0};", rhs.ToString());
Guid guid = System.Guid.NewGuid();
// First run
// a = 1
List<Subtree> added = new List<Subtree>();
Subtree st = ProtoTestFx.TD.TestFrameWork.CreateSubTreeFromCode(guid, code);
st.IsInput = true;
added.Add(st);
var syncData = new GraphSyncData(null, added, null);
liverunner.UpdateGraph(syncData);
instrStreamStart = runtimeDiagnostics.GetExecutableInstructionCount();
ProtoCore.Mirror.RuntimeMirror mirror = liverunner.InspectNodeValue("a");
Assert.IsTrue((Int64)mirror.GetData().Data == 0);
List<Subtree> modified = null;
const int maxUpdate = 100;
for (int n = 1; n <= maxUpdate; ++n)
{
// Modify a
code = String.Format("a = {0};", n.ToString());
modified = new List<Subtree>();
st = ProtoTestFx.TD.TestFrameWork.CreateSubTreeFromCode(guid, code);
st.IsInput = true;
modified.Add(st);
syncData = new GraphSyncData(null, null, modified);
liverunner.UpdateGraph(syncData);
instrStreamEnd = runtimeDiagnostics.GetExecutableInstructionCount();
Assert.AreEqual(instrStreamStart, instrStreamEnd);
}
mirror = liverunner.InspectNodeValue("a");
Assert.IsTrue((Int64)mirror.GetData().Data == 100);
}
[Test]
[Category("Failure")]
public void TestInstructionStreamMemory_FunctionRedefinition01()
{
List<string> codes = new List<string>()
{
"def f() {return = 1;}",
"a = f();",
"def f() {return = 2;}"
};
Guid guid1 = System.Guid.NewGuid();
Guid guid2 = System.Guid.NewGuid();
// First run
List<Subtree> added = new List<Subtree>();
Subtree st = ProtoTestFx.TD.TestFrameWork.CreateSubTreeFromCode(guid1, codes[0]);
added.Add(st);
st = ProtoTestFx.TD.TestFrameWork.CreateSubTreeFromCode(guid2, codes[1]);
added.Add(st);
var syncData = new GraphSyncData(null, added, null);
liverunner.UpdateGraph(syncData);
instrStreamStart = runtimeDiagnostics.GetExecutableInstructionCount();
ProtoCore.Mirror.RuntimeMirror mirror = liverunner.InspectNodeValue("a");
Assert.IsTrue((Int64)mirror.GetData().Data == 1);
// Modify function
List<Subtree> modified = new List<Subtree>();
st = ProtoTestFx.TD.TestFrameWork.CreateSubTreeFromCode(guid1, codes[2]);
modified.Add(st);
syncData = new GraphSyncData(null, null, modified);
liverunner.UpdateGraph(syncData);
instrStreamEnd = runtimeDiagnostics.GetExecutableInstructionCount();
mirror = liverunner.InspectNodeValue("a");
Assert.IsTrue((Int64)mirror.GetData().Data == 2);
Assert.AreEqual(instrStreamStart, instrStreamEnd);
}
}
}
| 34.482353 | 93 | 0.578813 | [
"Apache-2.0",
"MIT"
] | frankfralick/Dynamo | test/Engine/ProtoTest/LiveRunnerTests/MemoryConsumptionTests.cs | 5,866 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace WebsiteServiceClient.Datas
{
public class MachineMonitorInfo
{
/// <summary>
/// CPU 使用率
/// </summary>
public float CpuUsage { get; set; }
/// <summary>
/// 核心数
/// </summary>
public int CoreNumber { get; set; }
/// <summary>
/// 可用内存 GB
/// </summary>
public float MemoryAvailable { get; set; }
/// <summary>
/// 物理内存 GB
/// </summary>
public float PhysicalMemory { get; set; }
/// <summary>
/// 硬盘信息
/// </summary>
public List<HardDiskInfo> HardDisks { get; set; }
/// <summary>
/// 磁盘读速度 KB
/// </summary>
public int DiskReadData { get; set; }
/// <summary>
/// 磁盘写速度 KB
/// </summary>
public int DiskWriteData { get; set; }
/// <summary>
/// 网络下载 KB
/// </summary>
public int NetworkReceiveData { get; set; }
/// <summary>
/// 网络上传 KB
/// </summary>
public int NetworkSendData { get; set; }
public override string ToString()
{
return $"CPU:{CoreNumber}核,使用率{CpuUsage:0.00}%,可用内存{MemoryAvailable:0.00}GB,总共内存{PhysicalMemory:0.00}GB";
}
}
}
| 24.45614 | 117 | 0.5 | [
"MIT"
] | toolgood/ServerMonitor | WebsiteServiceClient/Datas/MachineMonitorInfo.cs | 1,498 | C# |
using Neo.VM;
using Neo.VM.Types;
using System.Numerics;
namespace Neo.SmartContract.Native
{
public class AccountState : IInteroperable
{
public BigInteger Balance;
public virtual void FromStackItem(StackItem stackItem)
{
Balance = ((Struct)stackItem)[0].GetInteger();
}
public virtual StackItem ToStackItem(ReferenceCounter referenceCounter)
{
return new Struct(referenceCounter) { Balance };
}
}
}
| 22.545455 | 79 | 0.643145 | [
"MIT"
] | ShawnYun/neo | src/neo/SmartContract/Native/AccountState.cs | 496 | C# |
using System;
using System.IO;
using System.Threading.Tasks;
using static pmcenter.Methods;
using static pmcenter.Methods.Logging;
namespace pmcenter.CommandLines
{
internal class BackupCmdLine : ICommandLine
{
public string Prefix => "backup";
public bool ExitAfterExecution => true;
public Task<bool> Process()
{
Log("Backing up...", "CMD");
var randomFilename = $"pmcenter.{DateTime.Now:yyyy-dd-M-HH-mm-ss}#{GetRandomString(6)}.json";
randomFilename = Path.Combine(Vars.AppDirectory, randomFilename);
File.Copy(Vars.ConfFile, randomFilename);
Log($"Backup complete. Filename: {randomFilename}", "CMD");
return Task.FromResult(true);
}
}
}
| 32 | 105 | 0.639323 | [
"Apache-2.0"
] | Elepover/pmcenter | pmcenter/CommandLines/BackupCmdLine.cs | 770 | C# |
// <auto-generated />
using System;
using DncZeus.Api.Entities;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace DncZeus.Api.Migrations
{
[DbContext(typeof(DncZeusDbContext))]
[Migration("20200518091509_MyMigration76")]
partial class MyMigration76
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "2.1.14-servicing-32113")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("DncZeus.Api.Entities.ApprovalDuty", b =>
{
b.Property<Guid>("Guid")
.ValueGeneratedOnAdd();
b.Property<DateTime?>("credate");
b.Property<string>("department")
.HasColumnType("nvarchar(40)");
b.Property<string>("getMask")
.HasColumnType("nvarchar(50)");
b.Property<string>("name")
.HasColumnType("nvarchar(50)");
b.Property<string>("ordernum")
.HasColumnType("nvarchar(50)");
b.Property<string>("status")
.HasColumnType("nvarchar(20)");
b.Property<string>("temperature")
.HasColumnType("nvarchar(50)");
b.Property<string>("tmpnum")
.HasColumnType("nvarchar(50)");
b.Property<string>("type")
.HasColumnType("nvarchar(20)");
b.Property<string>("username")
.IsRequired()
.HasColumnType("nvarchar(10)");
b.HasKey("Guid");
b.ToTable("ApprovalDuty");
});
modelBuilder.Entity("DncZeus.Api.Entities.ApprovalGoods", b =>
{
b.Property<Guid>("Guid")
.ValueGeneratedOnAdd();
b.Property<string>("attachment")
.HasColumnType("nvarchar(1000)");
b.Property<DateTime?>("credate");
b.Property<string>("department")
.HasColumnType("nvarchar(40)");
b.Property<string>("goodscount")
.HasColumnType("nvarchar(200)");
b.Property<string>("goodsname")
.HasColumnType("nvarchar(200)");
b.Property<string>("ordernum")
.HasColumnType("nvarchar(50)");
b.Property<string>("purpose")
.HasColumnType("nvarchar(200)");
b.Property<string>("status")
.HasColumnType("nvarchar(20)");
b.Property<string>("tmpnum")
.HasColumnType("nvarchar(50)");
b.Property<string>("type")
.HasColumnType("nvarchar(20)");
b.Property<string>("username")
.IsRequired()
.HasColumnType("nvarchar(10)");
b.HasKey("Guid");
b.ToTable("ApprovalGoods");
});
modelBuilder.Entity("DncZeus.Api.Entities.ApprovalStaffBack", b =>
{
b.Property<Guid>("Guid")
.ValueGeneratedOnAdd();
b.Property<string>("address")
.HasColumnType("nvarchar(200)");
b.Property<DateTime?>("backDate");
b.Property<DateTime?>("credate");
b.Property<string>("department")
.HasColumnType("nvarchar(40)");
b.Property<string>("endPlace")
.HasColumnType("nvarchar(200)");
b.Property<string>("isFever")
.HasColumnType("nvarchar(20)");
b.Property<string>("isIll")
.HasColumnType("nvarchar(20)");
b.Property<string>("isPass")
.HasColumnType("nvarchar(50)");
b.Property<string>("isReport")
.HasColumnType("nvarchar(50)");
b.Property<string>("isTouch")
.HasColumnType("nvarchar(20)");
b.Property<string>("liveType")
.HasColumnType("nvarchar(20)");
b.Property<string>("ordernum")
.HasColumnType("nvarchar(50)");
b.Property<DateTime?>("quarantine");
b.Property<string>("startPlace")
.HasColumnType("nvarchar(200)");
b.Property<string>("status")
.HasColumnType("nvarchar(20)");
b.Property<string>("tmpnum")
.HasColumnType("nvarchar(50)");
b.Property<string>("type")
.HasColumnType("nvarchar(20)");
b.Property<string>("username")
.IsRequired()
.HasColumnType("nvarchar(10)");
b.Property<string>("vehicle")
.HasColumnType("nvarchar(50)");
b.Property<DateTime?>("zsDate");
b.HasKey("Guid");
b.ToTable("ApprovalStaffBack");
});
modelBuilder.Entity("DncZeus.Api.Entities.DncIcon", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<string>("Code")
.IsRequired()
.HasColumnType("nvarchar(50)");
b.Property<string>("Color")
.HasColumnType("nvarchar(50)");
b.Property<Guid>("CreatedByUserGuid");
b.Property<string>("CreatedByUserName");
b.Property<DateTime>("CreatedOn");
b.Property<string>("Custom")
.HasColumnType("nvarchar(60)");
b.Property<string>("Description")
.HasColumnType("nvarchar(max)");
b.Property<int>("IsDeleted");
b.Property<Guid?>("ModifiedByUserGuid");
b.Property<string>("ModifiedByUserName");
b.Property<DateTime?>("ModifiedOn");
b.Property<string>("Size")
.HasColumnType("nvarchar(20)");
b.Property<int>("Status");
b.HasKey("Id");
b.ToTable("DncIcon");
});
modelBuilder.Entity("DncZeus.Api.Entities.DncMenu", b =>
{
b.Property<Guid>("Guid");
b.Property<string>("Alias")
.HasColumnType("nvarchar(255)");
b.Property<string>("BeforeCloseFun")
.HasMaxLength(255);
b.Property<string>("Component")
.HasMaxLength(255);
b.Property<Guid>("CreatedByUserGuid");
b.Property<string>("CreatedByUserName");
b.Property<DateTime>("CreatedOn");
b.Property<string>("Description")
.HasColumnType("nvarchar(800)");
b.Property<int?>("HideInMenu");
b.Property<string>("Icon")
.HasColumnType("nvarchar(128)");
b.Property<int>("IsDefaultRouter");
b.Property<int>("IsDeleted");
b.Property<int>("Level");
b.Property<Guid?>("ModifiedByUserGuid");
b.Property<string>("ModifiedByUserName");
b.Property<DateTime?>("ModifiedOn");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("nvarchar(50)");
b.Property<int?>("NotCache");
b.Property<Guid?>("ParentGuid");
b.Property<string>("ParentName");
b.Property<int>("Sort");
b.Property<int>("Status");
b.Property<string>("Url")
.HasColumnType("nvarchar(255)");
b.HasKey("Guid");
b.ToTable("DncMenu");
});
modelBuilder.Entity("DncZeus.Api.Entities.DncPermission", b =>
{
b.Property<string>("Code")
.ValueGeneratedOnAdd()
.HasColumnType("nvarchar(20)");
b.Property<string>("ActionCode")
.IsRequired()
.HasColumnType("nvarchar(80)");
b.Property<Guid>("CreatedByUserGuid");
b.Property<string>("CreatedByUserName");
b.Property<DateTime>("CreatedOn");
b.Property<string>("Description")
.HasColumnType("nvarchar(max)");
b.Property<string>("Icon");
b.Property<int>("IsDeleted");
b.Property<Guid>("MenuGuid");
b.Property<Guid?>("ModifiedByUserGuid");
b.Property<string>("ModifiedByUserName");
b.Property<DateTime?>("ModifiedOn");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("nvarchar(50)");
b.Property<int>("Status");
b.Property<int>("Type");
b.HasKey("Code");
b.HasIndex("Code")
.IsUnique();
b.HasIndex("MenuGuid");
b.ToTable("DncPermission");
});
modelBuilder.Entity("DncZeus.Api.Entities.DncRole", b =>
{
b.Property<string>("Code")
.ValueGeneratedOnAdd()
.HasColumnType("nvarchar(50)");
b.Property<Guid>("CreatedByUserGuid");
b.Property<string>("CreatedByUserName");
b.Property<DateTime>("CreatedOn");
b.Property<string>("Description")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsBuiltin");
b.Property<int>("IsDeleted");
b.Property<bool>("IsSuperAdministrator");
b.Property<Guid?>("ModifiedByUserGuid");
b.Property<string>("ModifiedByUserName");
b.Property<DateTime?>("ModifiedOn");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("nvarchar(50)");
b.Property<int>("Status");
b.HasKey("Code");
b.HasIndex("Code")
.IsUnique();
b.ToTable("DncRole");
});
modelBuilder.Entity("DncZeus.Api.Entities.DncRolePermissionMapping", b =>
{
b.Property<string>("RoleCode")
.HasColumnType("nvarchar(50)");
b.Property<string>("PermissionCode")
.HasColumnType("nvarchar(20)");
b.Property<DateTime>("CreatedOn");
b.HasKey("RoleCode", "PermissionCode");
b.HasIndex("PermissionCode");
b.ToTable("DncRolePermissionMapping");
});
modelBuilder.Entity("DncZeus.Api.Entities.DncUser", b =>
{
b.Property<Guid>("Guid");
b.Property<string>("Avatar")
.HasColumnType("nvarchar(255)");
b.Property<Guid>("CreatedByUserGuid");
b.Property<string>("CreatedByUserName");
b.Property<DateTime>("CreatedOn");
b.Property<string>("Description")
.HasColumnType("nvarchar(800)");
b.Property<string>("DisplayName")
.HasColumnType("nvarchar(50)");
b.Property<int>("IsDeleted");
b.Property<int>("IsLocked");
b.Property<string>("LoginName")
.IsRequired()
.HasColumnType("nvarchar(50)");
b.Property<Guid?>("ModifiedByUserGuid");
b.Property<string>("ModifiedByUserName");
b.Property<DateTime?>("ModifiedOn");
b.Property<string>("Password")
.HasColumnType("nvarchar(255)");
b.Property<int>("Status");
b.Property<int>("UserType");
b.HasKey("Guid");
b.ToTable("DncUser");
});
modelBuilder.Entity("DncZeus.Api.Entities.DncUserRoleMapping", b =>
{
b.Property<Guid>("UserGuid");
b.Property<string>("RoleCode");
b.Property<DateTime>("CreatedOn");
b.HasKey("UserGuid", "RoleCode");
b.HasIndex("RoleCode");
b.ToTable("DncUserRoleMapping");
});
modelBuilder.Entity("DncZeus.Api.Entities.Mis.Mismessage", b =>
{
b.Property<Guid>("Guid")
.ValueGeneratedOnAdd();
b.Property<int>("Org");
b.Property<int>("SourceID");
b.Property<string>("message")
.HasColumnType("varchar(250)");
b.Property<byte>("mtype")
.HasColumnType("tinyint");
b.Property<byte>("readStatus")
.HasColumnType("tinyint");
b.Property<DateTime?>("readTime");
b.Property<DateTime?>("receiveTime");
b.Property<string>("receiveUsername")
.HasColumnType("varchar(20)");
b.Property<string>("receiveUserno")
.HasColumnType("varchar(20)");
b.Property<string>("sendUsername")
.HasColumnType("varchar(20)");
b.Property<string>("sendUserno")
.HasColumnType("varchar(20)");
b.Property<byte>("status")
.HasColumnType("tinyint");
b.HasKey("Guid");
b.ToTable("Mismessage");
});
modelBuilder.Entity("DncZeus.Api.Entities.MisAttachment", b =>
{
b.Property<Guid>("Guid");
b.Property<DateTime?>("credate");
b.Property<string>("creuser")
.HasColumnType("nvarchar(20)");
b.Property<string>("fillName")
.HasColumnType("nvarchar(200)");
b.Property<int>("fillSize");
b.Property<string>("fillType")
.HasColumnType("nvarchar(200)");
b.Property<string>("folderName")
.HasColumnType("nvarchar(100)");
b.Property<string>("frPathUrl")
.HasColumnType("nvarchar(300)");
b.Property<string>("mainUrl")
.IsRequired()
.HasColumnType("nvarchar(100)");
b.Property<string>("mmdd")
.HasColumnType("nvarchar(4)");
b.Property<string>("pathUrl")
.HasColumnType("nvarchar(300)");
b.Property<string>("yyyy")
.HasColumnType("nvarchar(4)");
b.HasKey("Guid");
b.ToTable("MisAttachment");
});
modelBuilder.Entity("DncZeus.Api.Entities.MisCatalog", b =>
{
b.Property<int>("ID")
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<string>("Code")
.IsRequired()
.HasColumnType("nvarchar(10)");
b.Property<string>("Icon")
.HasColumnType("varchar(128)");
b.Property<string>("Name")
.HasColumnType("nvarchar(40)");
b.Property<DateTime?>("credate");
b.Property<string>("creuser")
.HasColumnType("nvarchar(20)");
b.Property<string>("isEnabled")
.HasColumnType("char(1)");
b.Property<DateTime?>("moddate");
b.Property<string>("moduser")
.HasColumnType("nvarchar(20)");
b.Property<int>("trseq");
b.HasKey("ID");
b.ToTable("MisCatalog");
});
modelBuilder.Entity("DncZeus.Api.Entities.MisCkind", b =>
{
b.Property<int>("ID")
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<string>("Icon")
.HasColumnType("varchar(128)");
b.Property<int?>("MisCatalogID");
b.Property<string>("ckdesc")
.HasColumnType("nvarchar(30)");
b.Property<string>("ckind")
.IsRequired()
.HasColumnType("nvarchar(2)");
b.Property<short>("clen");
b.Property<DateTime?>("credate");
b.Property<string>("creuser")
.HasColumnType("nvarchar(20)");
b.Property<string>("isEnabled")
.HasColumnType("char(1)");
b.Property<string>("isOrgValid")
.HasColumnType("char(1)");
b.Property<DateTime?>("moddate");
b.Property<string>("moduser")
.HasColumnType("nvarchar(20)");
b.Property<short>("trseq");
b.HasKey("ID");
b.HasIndex("MisCatalogID");
b.ToTable("MisCkind");
});
modelBuilder.Entity("DncZeus.Api.Entities.MisCkindExtend", b =>
{
b.Property<int>("ID")
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<int>("MisCKindId");
b.Property<byte>("Num")
.HasColumnType("tinyint");
b.Property<string>("colName")
.HasColumnType("nvarchar(10)");
b.Property<byte>("colType")
.HasColumnType("tinyint");
b.Property<DateTime?>("credate");
b.Property<string>("creuser")
.HasColumnType("nvarchar(20)");
b.Property<string>("isEnabled")
.IsRequired()
.HasConversion(new ValueConverter<string, string>(v => default(string), v => default(string), new ConverterMappingHints(size: 64)))
.HasColumnType("char(1)");
b.Property<DateTime?>("moddate");
b.Property<string>("moduser")
.HasColumnType("nvarchar(20)");
b.Property<int>("sourceId");
b.HasKey("ID");
b.ToTable("MisCkindExtend");
});
modelBuilder.Entity("DncZeus.Api.Entities.MisCkindPower", b =>
{
b.Property<int>("ID")
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<int>("MisKindID");
b.Property<DateTime?>("credate");
b.Property<string>("creuser")
.HasColumnType("nvarchar(20)");
b.Property<string>("inuse")
.HasColumnType("char(1)");
b.Property<int>("orgId");
b.Property<string>("padd")
.HasColumnType("char(1)");
b.Property<string>("pdelete")
.HasColumnType("char(1)");
b.Property<string>("pmodify")
.HasColumnType("char(1)");
b.Property<string>("username")
.HasColumnType("nvarchar(20)");
b.Property<string>("userno")
.HasColumnType("varchar(50)");
b.HasKey("ID");
b.ToTable("MisCkindPower");
});
modelBuilder.Entity("DncZeus.Api.Entities.MisCode", b =>
{
b.Property<int>("ID")
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<int?>("MisCkindID");
b.Property<int?>("MisOrganizationID");
b.Property<string>("cdesc")
.HasColumnType("varchar(500)");
b.Property<string>("code")
.HasColumnType("nvarchar(20)");
b.Property<DateTime?>("credate");
b.Property<string>("creuser")
.HasColumnType("nvarchar(20)");
b.Property<string>("extendCode1")
.HasColumnType("nvarchar(20)");
b.Property<string>("extendCode2")
.HasColumnType("nvarchar(20)");
b.Property<string>("extendCode3")
.HasColumnType("nvarchar(20)");
b.Property<string>("extendCode4")
.HasColumnType("nvarchar(20)");
b.Property<string>("extendCode5")
.HasColumnType("nvarchar(20)");
b.Property<string>("extendCode6")
.HasColumnType("nvarchar(20)");
b.Property<string>("extendCode7")
.HasColumnType("nvarchar(20)");
b.Property<string>("extendCode8")
.HasColumnType("nvarchar(20)");
b.Property<string>("extendCode9")
.HasColumnType("nvarchar(20)");
b.Property<string>("extendName1")
.HasColumnType("nvarchar(200)");
b.Property<string>("extendName2")
.HasColumnType("nvarchar(200)");
b.Property<string>("extendName3")
.HasColumnType("nvarchar(200)");
b.Property<string>("extendName4")
.HasColumnType("nvarchar(200)");
b.Property<string>("extendName5")
.HasColumnType("nvarchar(200)");
b.Property<string>("extendName6")
.HasColumnType("nvarchar(200)");
b.Property<string>("extendName7")
.HasColumnType("nvarchar(200)");
b.Property<string>("extendName8")
.HasColumnType("nvarchar(200)");
b.Property<string>("extendName9")
.HasColumnType("nvarchar(200)");
b.Property<string>("isEnabled")
.HasColumnType("char(1)");
b.Property<DateTime?>("moddate");
b.Property<string>("moduser")
.HasColumnType("nvarchar(20)");
b.HasKey("ID");
b.HasIndex("MisCkindID");
b.HasIndex("MisOrganizationID");
b.ToTable("MisCode");
});
modelBuilder.Entity("DncZeus.Api.Entities.MisOrganization", b =>
{
b.Property<int>("ID")
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<string>("Code")
.IsRequired()
.HasColumnType("nvarchar(10)");
b.Property<string>("Name")
.HasColumnType("nvarchar(40)");
b.Property<DateTime?>("credate");
b.Property<string>("creuser")
.HasColumnType("nvarchar(20)");
b.Property<DateTime?>("moddate");
b.Property<string>("moduser")
.HasColumnType("nvarchar(20)");
b.HasKey("ID");
b.ToTable("MisOrganization");
});
modelBuilder.Entity("DncZeus.Api.Entities.Pmc.PmcDeporderday", b =>
{
b.Property<Guid>("Guid")
.ValueGeneratedOnAdd();
b.Property<int>("OrgID");
b.Property<DateTime?>("credate");
b.Property<string>("creuser")
.HasColumnType("nvarchar(20)");
b.Property<DateTime>("day")
.HasColumnType("date");
b.Property<string>("department")
.HasColumnType("varchar(20)");
b.Property<byte>("dtype")
.HasColumnType("tinyint");
b.Property<byte>("isrest")
.HasColumnType("tinyint");
b.Property<DateTime?>("moddate");
b.Property<string>("moduser")
.HasColumnType("nvarchar(20)");
b.Property<string>("remark")
.HasColumnType("varchar(50)");
b.HasKey("Guid");
b.ToTable("PmcDeporderday");
});
modelBuilder.Entity("DncZeus.Api.Entities.Pmc.PmcDuties", b =>
{
b.Property<Guid>("Guid")
.ValueGeneratedOnAdd();
b.Property<string>("Code")
.HasColumnType("varchar(20)");
b.Property<string>("Name")
.HasColumnType("varchar(300)");
b.Property<int>("OrgID");
b.Property<DateTime?>("cfmdate");
b.Property<string>("cfmuser")
.HasColumnType("nvarchar(20)");
b.Property<DateTime?>("credate");
b.Property<string>("creuser")
.HasColumnType("nvarchar(20)");
b.Property<string>("department")
.HasColumnType("varchar(20)");
b.Property<short>("dodate")
.HasColumnType("smallint");
b.Property<byte>("dotype")
.HasColumnType("tinyint");
b.Property<Guid?>("dutiesGuid");
b.Property<byte>("iskeep")
.HasColumnType("tinyint");
b.Property<byte>("itype")
.HasColumnType("tinyint");
b.Property<short>("keepdate")
.HasColumnType("smallint");
b.Property<DateTime?>("moddate");
b.Property<string>("moduser")
.HasColumnType("nvarchar(20)");
b.Property<byte>("projectStatus")
.HasColumnType("tinyint");
b.Property<string>("remark")
.HasColumnType("varchar(200)");
b.Property<byte>("status")
.HasColumnType("tinyint");
b.HasKey("Guid");
b.ToTable("PmcDuties");
});
modelBuilder.Entity("DncZeus.Api.Entities.Pmc.PmcDutiesecond", b =>
{
b.Property<Guid>("Guid")
.ValueGeneratedOnAdd();
b.Property<DateTime?>("credate");
b.Property<string>("creuser")
.HasColumnType("nvarchar(20)");
b.Property<Guid?>("dutiesGuid");
b.Property<Guid?>("secondGuid");
b.HasKey("Guid");
b.ToTable("PmcDutiesecond");
});
modelBuilder.Entity("DncZeus.Api.Entities.Pmc.PmcJobuser", b =>
{
b.Property<Guid>("Guid")
.ValueGeneratedOnAdd();
b.Property<int>("OrgID");
b.Property<DateTime?>("credate");
b.Property<string>("creuser")
.HasColumnType("nvarchar(20)");
b.Property<byte>("isvalid")
.HasColumnType("tinyint");
b.Property<Guid>("jobGuid");
b.Property<int>("jobId");
b.Property<DateTime?>("moddate");
b.Property<string>("moduser")
.HasColumnType("nvarchar(20)");
b.Property<Guid?>("userGuid");
b.HasKey("Guid");
b.ToTable("PmcJobuser");
});
modelBuilder.Entity("DncZeus.Api.Entities.Pmc.PmcOrderday", b =>
{
b.Property<Guid>("Guid")
.ValueGeneratedOnAdd();
b.Property<int>("OrgID");
b.Property<DateTime?>("credate");
b.Property<string>("creuser")
.HasColumnType("nvarchar(20)");
b.Property<DateTime>("day")
.HasColumnType("date");
b.Property<byte>("dtype")
.HasColumnType("tinyint");
b.Property<byte>("isrest")
.HasColumnType("tinyint");
b.Property<DateTime?>("moddate");
b.Property<string>("moduser")
.HasColumnType("nvarchar(20)");
b.Property<string>("remark")
.HasColumnType("varchar(50)");
b.HasKey("Guid");
b.ToTable("PmcOrderday");
});
modelBuilder.Entity("DncZeus.Api.Entities.Pmc.PmcPlannote", b =>
{
b.Property<Guid>("Guid")
.ValueGeneratedOnAdd();
b.Property<DateTime?>("credate");
b.Property<string>("creuser")
.HasColumnType("nvarchar(20)");
b.Property<string>("factory")
.HasColumnType("varchar(20)");
b.Property<byte>("isfactory")
.HasColumnType("tinyint");
b.Property<DateTime?>("moddate");
b.Property<string>("moduser")
.HasColumnType("nvarchar(20)");
b.Property<string>("mono")
.HasColumnType("varchar(20)");
b.Property<Guid?>("projectitemGuid");
b.Property<Guid?>("projectlineGuid");
b.Property<Guid?>("projectplanGuid");
b.Property<string>("remark")
.HasColumnType("varchar(200)");
b.Property<DateTime?>("workdate");
b.Property<short>("workqty")
.HasColumnType("smallint");
b.Property<byte>("workstatus")
.HasColumnType("tinyint");
b.HasKey("Guid");
b.ToTable("PmcPlannote");
});
modelBuilder.Entity("DncZeus.Api.Entities.Pmc.PmcProjectAttachment", b =>
{
b.Property<Guid>("Guid")
.ValueGeneratedOnAdd();
b.Property<Guid?>("attGuid");
b.Property<byte>("attType")
.HasColumnType("tinyint");
b.Property<DateTime?>("credate");
b.Property<string>("creuser")
.HasColumnType("nvarchar(20)");
b.Property<string>("fileName")
.HasColumnType("varchar(200)");
b.Property<Guid?>("parentGuid");
b.Property<byte>("parentType")
.HasColumnType("tinyint");
b.HasKey("Guid");
b.ToTable("PmcProjectAttachment");
});
modelBuilder.Entity("DncZeus.Api.Entities.Pmc.PmcProjectitem", b =>
{
b.Property<Guid>("Guid")
.ValueGeneratedOnAdd();
b.Property<DateTime?>("credate");
b.Property<string>("creuser")
.HasColumnType("nvarchar(20)");
b.Property<decimal>("inqty")
.HasColumnType("decimal(10,2)");
b.Property<byte>("itemType")
.HasColumnType("tinyint");
b.Property<string>("itemcode")
.HasColumnType("varchar(20)");
b.Property<string>("itemname")
.HasColumnType("varchar(200)");
b.Property<DateTime?>("moddate");
b.Property<string>("moduser")
.HasColumnType("nvarchar(20)");
b.Property<Guid>("projectlineGuid");
b.Property<decimal>("purqty")
.HasColumnType("decimal(10,2)");
b.Property<decimal>("qty")
.HasColumnType("decimal(10,2)");
b.Property<string>("remark")
.HasColumnType("varchar(200)");
b.Property<DateTime?>("reqDate");
b.Property<decimal>("reqqty")
.HasColumnType("decimal(10,2)");
b.Property<byte>("status")
.HasColumnType("tinyint");
b.Property<string>("unitcode")
.HasColumnType("varchar(10)");
b.HasKey("Guid");
b.ToTable("PmcProjectitem");
});
modelBuilder.Entity("DncZeus.Api.Entities.Pmc.PmcProjectline", b =>
{
b.Property<Guid>("Guid")
.ValueGeneratedOnAdd();
b.Property<decimal>("amount")
.HasColumnType("decimal(10,2)");
b.Property<DateTime?>("credate");
b.Property<string>("creuser")
.HasColumnType("nvarchar(20)");
b.Property<string>("custitemcode")
.HasColumnType("varchar(20)");
b.Property<string>("custitemname")
.HasColumnType("varchar(200)");
b.Property<string>("desc")
.HasColumnType("varchar(200)");
b.Property<string>("factory")
.HasColumnType("varchar(20)");
b.Property<string>("imageNO")
.HasColumnType("varchar(20)");
b.Property<string>("images")
.HasColumnType("varchar(200)");
b.Property<string>("imgSrc")
.HasColumnType("varchar(300)");
b.Property<DateTime?>("moddate");
b.Property<string>("moduser")
.HasColumnType("nvarchar(20)");
b.Property<string>("otherImages")
.HasColumnType("varchar(200)");
b.Property<string>("otherImgSrc")
.HasColumnType("varchar(2000)");
b.Property<decimal>("price")
.HasColumnType("decimal(10,4)");
b.Property<Guid?>("projectsGuid");
b.Property<decimal>("qty")
.HasColumnType("decimal(10,2)");
b.Property<string>("remark")
.HasColumnType("varchar(200)");
b.Property<DateTime?>("reqDate");
b.Property<string>("styleNO")
.HasColumnType("varchar(20)");
b.HasKey("Guid");
b.ToTable("PmcProjectline");
});
modelBuilder.Entity("DncZeus.Api.Entities.Pmc.PmcProjectplan", b =>
{
b.Property<Guid>("Guid")
.ValueGeneratedOnAdd();
b.Property<DateTime?>("abegindate");
b.Property<DateTime?>("aenddate");
b.Property<string>("curProgress")
.HasColumnType("varchar(300)");
b.Property<short>("dodate")
.HasColumnType("smallint");
b.Property<Guid?>("dutiesGuid");
b.Property<byte>("isdel")
.HasColumnType("tinyint");
b.Property<byte>("iskeep")
.HasColumnType("tinyint");
b.Property<DateTime?>("pbegindate");
b.Property<DateTime?>("penddate");
b.Property<Guid?>("projectsGuid");
b.Property<byte>("ptype")
.HasColumnType("tinyint");
b.Property<string>("remark")
.HasColumnType("varchar(200)");
b.Property<decimal>("restCount")
.HasColumnType("decimal(10,2)");
b.Property<string>("restDesc")
.HasColumnType("varchar(200)");
b.Property<byte>("status")
.HasColumnType("tinyint");
b.Property<decimal>("totalqty")
.HasColumnType("decimal(10,2)");
b.HasKey("Guid");
b.ToTable("PmcProjectplan");
});
modelBuilder.Entity("DncZeus.Api.Entities.Pmc.PmcProjectplanday", b =>
{
b.Property<Guid>("Guid")
.ValueGeneratedOnAdd();
b.Property<short>("dodate")
.HasColumnType("smallint");
b.Property<Guid?>("dutiesGuid");
b.Property<short>("keepdate")
.HasColumnType("smallint");
b.Property<short>("prdodate")
.HasColumnType("smallint");
b.Property<short>("prkeepdate")
.HasColumnType("smallint");
b.Property<Guid?>("projectsGuid");
b.HasKey("Guid");
b.ToTable("PmcProjectplanday");
});
modelBuilder.Entity("DncZeus.Api.Entities.Pmc.PmcProjects", b =>
{
b.Property<Guid>("Guid")
.ValueGeneratedOnAdd();
b.Property<string>("Code")
.HasColumnType("varchar(20)");
b.Property<string>("Name")
.HasColumnType("varchar(300)");
b.Property<int>("OrgID");
b.Property<string>("address")
.HasColumnType("varchar(300)");
b.Property<string>("area")
.HasColumnType("varchar(300)");
b.Property<DateTime?>("cfmdate");
b.Property<string>("cfmuser")
.HasColumnType("nvarchar(20)");
b.Property<string>("contacter")
.HasColumnType("varchar(200)");
b.Property<DateTime?>("credate");
b.Property<string>("creuser")
.HasColumnType("nvarchar(20)");
b.Property<DateTime?>("custDate");
b.Property<string>("custcode")
.HasColumnType("varchar(50)");
b.Property<string>("custname")
.HasColumnType("varchar(200)");
b.Property<byte>("diffStatus")
.HasColumnType("tinyint");
b.Property<DateTime?>("factoryDate1");
b.Property<DateTime?>("factoryDate2");
b.Property<byte>("focusStatus")
.HasColumnType("tinyint");
b.Property<byte>("followgrade")
.HasColumnType("tinyint");
b.Property<byte>("isbatch")
.HasColumnType("tinyint");
b.Property<byte>("iscreorder")
.HasColumnType("tinyint");
b.Property<byte>("isdiff")
.HasColumnType("tinyint");
b.Property<byte>("isfocus")
.HasColumnType("tinyint");
b.Property<DateTime?>("moddate");
b.Property<string>("moduser")
.HasColumnType("nvarchar(20)");
b.Property<string>("phone")
.HasColumnType("varchar(200)");
b.Property<DateTime?>("procreDate");
b.Property<decimal>("qty")
.HasColumnType("decimal(10,2)");
b.Property<string>("remark")
.HasColumnType("varchar(200)");
b.Property<byte>("sfStatus")
.HasColumnType("tinyint");
b.Property<byte>("status")
.HasColumnType("tinyint");
b.Property<decimal>("totalmoney")
.HasColumnType("decimal(14,2)");
b.HasKey("Guid");
b.ToTable("PmcProjects");
});
modelBuilder.Entity("DncZeus.Api.Entities.Pmc.PmcWorknote", b =>
{
b.Property<Guid>("Guid")
.ValueGeneratedOnAdd();
b.Property<DateTime?>("credate");
b.Property<string>("creuser")
.HasColumnType("nvarchar(20)");
b.Property<string>("followRemark")
.HasColumnType("varchar(200)");
b.Property<Guid?>("projectsGuid");
b.Property<byte>("wtype")
.HasColumnType("tinyint");
b.HasKey("Guid");
b.ToTable("PmcWorknote");
});
modelBuilder.Entity("DncZeus.Api.Entities.Pmc.WjgcPlanfllow", b =>
{
b.Property<Guid>("Guid")
.ValueGeneratedOnAdd();
b.Property<byte>("Supremo")
.HasColumnType("tinyint");
b.Property<DateTime?>("credate");
b.Property<string>("creuser")
.HasColumnType("nvarchar(20)");
b.Property<string>("fllowDesc")
.HasColumnType("varchar(200)");
b.Property<byte>("isnote")
.HasColumnType("tinyint");
b.Property<DateTime?>("moddate");
b.Property<string>("moduser")
.HasColumnType("nvarchar(20)");
b.Property<string>("nodes")
.HasColumnType("varchar(200)");
b.Property<byte>("pmc")
.HasColumnType("tinyint");
b.Property<Guid?>("projectitemGuid");
b.Property<Guid?>("projectlineGuid");
b.Property<Guid?>("projectplanGuid");
b.Property<byte>("status")
.HasColumnType("tinyint");
b.Property<byte>("workmaster")
.HasColumnType("tinyint");
b.HasKey("Guid");
b.ToTable("WjgcPlanfllow");
});
modelBuilder.Entity("DncZeus.Api.Entities.Pmc.WjgcPlanfllowuser", b =>
{
b.Property<Guid>("Guid")
.ValueGeneratedOnAdd();
b.Property<DateTime?>("credate");
b.Property<string>("creuser")
.HasColumnType("nvarchar(20)");
b.Property<byte>("isnotice")
.HasColumnType("tinyint");
b.Property<Guid?>("planfllowGuid");
b.Property<DateTime?>("senddate");
b.Property<byte>("status")
.HasColumnType("tinyint");
b.Property<string>("userno");
b.HasKey("Guid");
b.ToTable("WjgcPlanfllowuser");
});
modelBuilder.Entity("DncZeus.Api.Entities.Sec.Secbutton", b =>
{
b.Property<Guid>("Guid")
.ValueGeneratedOnAdd();
b.Property<string>("butname")
.HasColumnType("varchar(20)");
b.Property<string>("butno")
.HasColumnType("varchar(20)");
b.Property<short>("butorder")
.HasColumnType("smallint");
b.Property<string>("enabled")
.HasColumnType("char(1)");
b.HasKey("Guid");
b.ToTable("Secbutton");
});
modelBuilder.Entity("DncZeus.Api.Entities.Sec.Secfun", b =>
{
b.Property<Guid>("Guid")
.ValueGeneratedOnAdd();
b.Property<string>("enabled")
.HasColumnType("char(1)");
b.Property<string>("funname")
.HasColumnType("varchar(48)");
b.Property<string>("funno")
.HasColumnType("varchar(4)");
b.Property<short>("funorder")
.HasColumnType("smallint");
b.Property<string>("icon")
.HasColumnType("varchar(128)");
b.Property<Guid>("sysid");
b.HasKey("Guid");
b.ToTable("Secfun");
});
modelBuilder.Entity("DncZeus.Api.Entities.Sec.Secgprg", b =>
{
b.Property<Guid>("Guid")
.ValueGeneratedOnAdd();
b.Property<Guid>("butid");
b.Property<DateTime?>("credate");
b.Property<string>("creuser")
.HasColumnType("nvarchar(20)");
b.Property<Guid>("groupid");
b.Property<int>("orgid");
b.Property<Guid>("prgid");
b.HasKey("Guid");
b.ToTable("Secgprg");
});
modelBuilder.Entity("DncZeus.Api.Entities.Sec.Secgroup", b =>
{
b.Property<Guid>("Guid")
.ValueGeneratedOnAdd();
b.Property<string>("enabled")
.HasColumnType("char(1)");
b.Property<string>("groupname")
.HasColumnType("varchar(48)");
b.Property<string>("groupno")
.HasColumnType("varchar(8)");
b.Property<string>("gtype")
.HasColumnType("char(1)");
b.Property<string>("remark")
.HasColumnType("varchar(200)");
b.HasKey("Guid");
b.ToTable("Secgroup");
});
modelBuilder.Entity("DncZeus.Api.Entities.Sec.Secguser", b =>
{
b.Property<Guid>("Guid")
.ValueGeneratedOnAdd();
b.Property<Guid>("groupid");
b.Property<Guid>("userid");
b.HasKey("Guid");
b.ToTable("Secguser");
});
modelBuilder.Entity("DncZeus.Api.Entities.Sec.Secprg", b =>
{
b.Property<Guid>("Guid")
.ValueGeneratedOnAdd();
b.Property<string>("enabled")
.HasColumnType("char(1)");
b.Property<Guid>("funid");
b.Property<string>("icon")
.HasColumnType("varchar(128)");
b.Property<Guid?>("mainid");
b.Property<string>("prgcomp")
.HasColumnType("varchar(255)");
b.Property<string>("prgname")
.HasColumnType("varchar(48)");
b.Property<string>("prgno")
.HasColumnType("varchar(16)");
b.Property<short>("prgorder")
.HasColumnType("smallint");
b.Property<string>("prgtype")
.HasColumnType("char(1)");
b.Property<string>("program")
.HasColumnType("varchar(255)");
b.Property<string>("runtype")
.HasColumnType("char(1)");
b.Property<Guid>("sysid");
b.HasKey("Guid");
b.ToTable("Secprg");
});
modelBuilder.Entity("DncZeus.Api.Entities.Sec.Secprgbut", b =>
{
b.Property<Guid>("Guid")
.ValueGeneratedOnAdd();
b.Property<Guid>("butid");
b.Property<string>("butname")
.HasColumnType("varchar(50)");
b.Property<string>("butno")
.HasColumnType("varchar(20)");
b.Property<short>("butorder")
.HasColumnType("smallint");
b.Property<Guid>("funid");
b.Property<Guid>("prgid");
b.Property<Guid>("sysid");
b.HasKey("Guid");
b.ToTable("Secprgbut");
});
modelBuilder.Entity("DncZeus.Api.Entities.Sec.Secsys", b =>
{
b.Property<Guid>("Guid")
.ValueGeneratedOnAdd();
b.Property<string>("enabled")
.HasColumnType("char(1)");
b.Property<string>("icon")
.HasColumnType("varchar(128)");
b.Property<string>("sysname")
.HasColumnType("varchar(48)");
b.Property<string>("sysno")
.HasColumnType("varchar(2)");
b.Property<short>("sysorder")
.HasColumnType("smallint");
b.HasKey("Guid");
b.ToTable("Secsys");
});
modelBuilder.Entity("DncZeus.Api.Entities.Sec.Secunit", b =>
{
b.Property<Guid>("Guid")
.ValueGeneratedOnAdd();
b.Property<string>("enabled")
.HasColumnType("char(1)");
b.Property<byte>("flag")
.HasColumnType("tinyint");
b.Property<string>("unitname")
.HasColumnType("varchar(20)");
b.Property<string>("unitno")
.HasColumnType("varchar(20)");
b.Property<short>("unitorder")
.HasColumnType("smallint");
b.HasKey("Guid");
b.ToTable("Secunit");
});
modelBuilder.Entity("DncZeus.Api.Entities.Sec.Secuprg", b =>
{
b.Property<Guid>("Guid")
.ValueGeneratedOnAdd();
b.Property<Guid>("butid");
b.Property<DateTime?>("credate");
b.Property<string>("creuser")
.HasColumnType("varchar(20)");
b.Property<int>("orgid");
b.Property<Guid>("prgid");
b.Property<Guid>("userid");
b.HasKey("Guid");
b.ToTable("Secuprg");
});
modelBuilder.Entity("DncZeus.Api.Entities.Sec.Secuser", b =>
{
b.Property<Guid>("Guid")
.ValueGeneratedOnAdd();
b.Property<string>("EmpName")
.HasColumnType("varchar(30)");
b.Property<string>("EmpNo")
.HasColumnType("varchar(20)");
b.Property<string>("code")
.HasColumnType("varchar(10)");
b.Property<DateTime?>("credate");
b.Property<string>("creuser")
.HasColumnType("nvarchar(20)");
b.Property<string>("depname")
.HasColumnType("varchar(100)");
b.Property<string>("depno")
.HasColumnType("varchar(20)");
b.Property<string>("email")
.HasColumnType("varchar(64)");
b.Property<string>("enabled")
.HasColumnType("char(1)");
b.Property<string>("jobname")
.HasColumnType("varchar(30)");
b.Property<string>("jobno")
.HasColumnType("varchar(20)");
b.Property<DateTime?>("moddate");
b.Property<string>("moduser")
.HasColumnType("nvarchar(20)");
b.Property<string>("pwd")
.HasColumnType("varchar(45)");
b.Property<string>("telno")
.HasColumnType("varchar(45)");
b.Property<string>("userLogo")
.HasColumnType("varchar(100)");
b.Property<string>("username")
.HasColumnType("varchar(200)");
b.Property<string>("userno")
.HasColumnType("varchar(20)");
b.Property<int>("utype");
b.Property<string>("wxAccount")
.HasColumnType("varchar(100)");
b.Property<string>("wxId")
.HasColumnType("varchar(100)");
b.Property<string>("wxMail")
.HasColumnType("varchar(100)");
b.Property<string>("wxName")
.HasColumnType("varchar(100)");
b.Property<string>("wxPhone")
.HasColumnType("varchar(100)");
b.Property<string>("wxPwd")
.HasColumnType("varchar(100)");
b.HasKey("Guid");
b.ToTable("Secuser");
});
modelBuilder.Entity("DncZeus.Api.Entities.Sec.Secuserorg", b =>
{
b.Property<Guid>("Guid")
.ValueGeneratedOnAdd();
b.Property<int>("orgid");
b.Property<Guid>("userid");
b.HasKey("Guid");
b.ToTable("Secuserorg");
});
modelBuilder.Entity("DncZeus.Api.Entities.TechItemMaster", b =>
{
b.Property<Guid>("Guid");
b.Property<int>("OrgID");
b.Property<string>("category")
.HasColumnType("nvarchar(10)");
b.Property<DateTime?>("cfmdate");
b.Property<string>("cfmuser")
.HasColumnType("nvarchar(20)");
b.Property<string>("contour")
.HasColumnType("nvarchar(10)");
b.Property<DateTime?>("credate");
b.Property<string>("creuser")
.HasColumnType("nvarchar(20)");
b.Property<string>("custcode")
.HasColumnType("nvarchar(20)");
b.Property<DateTime?>("deldate");
b.Property<string>("deluser")
.HasColumnType("nvarchar(20)");
b.Property<string>("direction")
.HasColumnType("nvarchar(10)");
b.Property<string>("havecarve")
.HasColumnType("char(1)");
b.Property<string>("haveclass")
.HasColumnType("char(1)");
b.Property<string>("havedrawing")
.HasColumnType("char(1)");
b.Property<string>("havehandrail")
.HasColumnType("char(1)");
b.Property<string>("havemarble")
.HasColumnType("char(1)");
b.Property<string>("havemetal")
.HasColumnType("char(1)");
b.Property<int>("isdel");
b.Property<string>("itemcode")
.HasColumnType("nvarchar(20)");
b.Property<DateTime?>("moddate");
b.Property<string>("moduser")
.HasColumnType("nvarchar(20)");
b.Property<string>("picsource")
.HasColumnType("nvarchar(10)");
b.Property<string>("protype")
.HasColumnType("nvarchar(10)");
b.Property<string>("remark")
.HasColumnType("nvarchar(200)");
b.Property<short>("seatqty");
b.Property<string>("status")
.HasColumnType("char(1)");
b.Property<string>("style")
.HasColumnType("nvarchar(10)");
b.Property<string>("subcategory")
.HasColumnType("nvarchar(10)");
b.Property<string>("wraptype")
.HasColumnType("nvarchar(10)");
b.HasKey("Guid");
b.ToTable("TechItemMaster");
});
modelBuilder.Entity("DncZeus.Api.Entities.TechItemmAttachment", b =>
{
b.Property<Guid>("Guid");
b.Property<Guid?>("MisAttachmentGuid");
b.Property<Guid?>("TechItemMasterGuid");
b.Property<string>("attType")
.HasColumnType("char(1)");
b.Property<string>("cont_sign")
.HasColumnType("nvarchar(100)");
b.Property<DateTime?>("credate");
b.Property<string>("creuser")
.HasColumnType("nvarchar(20)");
b.Property<DateTime?>("deldate");
b.Property<string>("deluser")
.HasColumnType("nvarchar(20)");
b.Property<string>("direction")
.HasColumnType("nvarchar(10)");
b.Property<string>("fileName")
.HasColumnType("nvarchar(200)");
b.Property<string>("isdel")
.HasColumnType("char(1)");
b.Property<string>("log_id")
.HasColumnType("nvarchar(50)");
b.Property<DateTime?>("moddate");
b.Property<string>("moduser")
.HasColumnType("nvarchar(20)");
b.Property<string>("picsource")
.HasColumnType("nvarchar(10)");
b.Property<string>("remark")
.HasColumnType("nvarchar(200)");
b.HasKey("Guid");
b.HasIndex("MisAttachmentGuid");
b.HasIndex("TechItemMasterGuid");
b.ToTable("TechItemmAttachment");
});
modelBuilder.Entity("DncZeus.Api.Entities.Tmp.TmpBoardsPrint", b =>
{
b.Property<Guid>("Guid")
.ValueGeneratedOnAdd();
b.Property<string>("LoginName")
.HasColumnType("nvarchar(50)");
b.Property<Guid?>("creUserGuid");
b.Property<string>("creUserName")
.HasColumnType("nvarchar(20)");
b.Property<DateTime?>("credate");
b.Property<Guid?>("itemBoardGuid");
b.Property<byte>("printType")
.HasColumnType("tinyint");
b.Property<DateTime?>("prtdate");
b.Property<short>("prtnum")
.HasColumnType("smallint");
b.Property<string>("remark")
.HasColumnType("varchar(200)");
b.HasKey("Guid");
b.ToTable("TmpBoardsPrint");
});
modelBuilder.Entity("DncZeus.Api.Entities.Tmp.TmpItembarHead", b =>
{
b.Property<Guid>("Guid")
.ValueGeneratedOnAdd();
b.Property<int>("Org");
b.Property<short>("bagqty")
.HasColumnType("smallint");
b.Property<short>("boardqty")
.HasColumnType("smallint");
b.Property<DateTime?>("cfmdate");
b.Property<string>("cfmuser")
.HasColumnType("nvarchar(20)");
b.Property<DateTime?>("credate");
b.Property<string>("creuser")
.HasColumnType("nvarchar(20)");
b.Property<string>("fPackNo")
.HasColumnType("varchar(20)");
b.Property<string>("fgoodscode")
.HasColumnType("varchar(50)");
b.Property<string>("fgoodsname")
.HasColumnType("nvarchar(150)");
b.Property<string>("fmono")
.HasColumnType("varchar(50)");
b.Property<string>("fordno")
.HasColumnType("varchar(50)");
b.Property<short>("fqty")
.HasColumnType("smallint");
b.Property<DateTime?>("moddate");
b.Property<string>("moduser")
.HasColumnType("nvarchar(20)");
b.Property<byte>("spStatus")
.HasColumnType("tinyint");
b.Property<short>("spqty")
.HasColumnType("smallint");
b.Property<byte>("status")
.HasColumnType("tinyint");
b.Property<string>("tmpPackNo")
.HasColumnType("varchar(20)");
b.Property<short>("unbagqty")
.HasColumnType("smallint");
b.HasKey("Guid");
b.ToTable("TmpItembarHead");
});
modelBuilder.Entity("DncZeus.Api.Entities.Tmp.TmpItembarLine", b =>
{
b.Property<Guid>("Guid")
.ValueGeneratedOnAdd();
b.Property<Guid?>("ItembarHeadGuid");
b.Property<byte>("boardType")
.HasColumnType("tinyint");
b.Property<string>("boardcode")
.HasColumnType("varchar(30)");
b.Property<string>("boardname")
.HasColumnType("varchar(200)");
b.Property<short>("boardnum")
.HasColumnType("smallint");
b.Property<DateTime?>("credate");
b.Property<string>("creuser")
.HasColumnType("nvarchar(20)");
b.Property<string>("fBarcode")
.HasColumnType("varchar(20)");
b.Property<short>("fqty")
.HasColumnType("smallint");
b.Property<string>("fspcode")
.HasColumnType("varchar(20)");
b.Property<string>("fspname")
.HasColumnType("nvarchar(150)");
b.Property<short>("hprintnum")
.HasColumnType("smallint");
b.Property<byte>("isValid")
.HasColumnType("tinyint");
b.Property<short>("lprintnum")
.HasColumnType("smallint");
b.Property<DateTime?>("moddate");
b.Property<string>("moduser")
.HasColumnType("nvarchar(20)");
b.Property<DateTime?>("valmdate");
b.Property<string>("valuser")
.HasColumnType("nvarchar(20)");
b.HasKey("Guid");
b.HasIndex("ItembarHeadGuid");
b.ToTable("TmpItembarLine");
});
modelBuilder.Entity("DncZeus.Api.Entities.Tmp.TmpItemBoards", b =>
{
b.Property<Guid>("Guid")
.ValueGeneratedOnAdd();
b.Property<int>("Org");
b.Property<string>("barCode")
.HasColumnType("varchar(50)");
b.Property<string>("batchNum")
.HasColumnType("varchar(20)");
b.Property<int>("boardQty");
b.Property<byte>("boardType")
.HasColumnType("tinyint");
b.Property<string>("boardcode")
.HasColumnType("varchar(30)");
b.Property<string>("boardname")
.HasColumnType("varchar(200)");
b.Property<short>("boardnum")
.HasColumnType("smallint");
b.Property<Guid>("boardshGuid")
.HasColumnType("uniqueidentifier");
b.Property<string>("boardsize")
.HasColumnType("varchar(100)");
b.Property<DateTime?>("cfmdate");
b.Property<string>("cfmuser")
.HasColumnType("nvarchar(20)");
b.Property<DateTime?>("credate");
b.Property<string>("creuser")
.HasColumnType("nvarchar(20)");
b.Property<string>("fBarcode")
.HasColumnType("varchar(20)");
b.Property<int>("fGoodsID")
.HasColumnType("int");
b.Property<short>("fOrdQty")
.HasColumnType("smallint");
b.Property<string>("fPackNo")
.HasColumnType("varchar(20)");
b.Property<string>("fgoodscode")
.HasColumnType("varchar(50)");
b.Property<string>("fgoodsname")
.HasColumnType("nvarchar(150)");
b.Property<string>("fmono")
.HasColumnType("varchar(50)");
b.Property<string>("fordno")
.HasColumnType("varchar(50)");
b.Property<string>("fspname")
.HasColumnType("nvarchar(150)");
b.Property<string>("imageNo")
.HasColumnType("varchar(50)");
b.Property<byte>("isSplit")
.HasColumnType("tinyint");
b.Property<byte>("isValid")
.HasColumnType("tinyint");
b.Property<short>("lprintnum")
.HasColumnType("smallint");
b.Property<DateTime?>("moddate");
b.Property<string>("moduser")
.HasColumnType("nvarchar(20)");
b.Property<string>("packIndex")
.HasColumnType("varchar(20)");
b.Property<short>("packQty")
.HasColumnType("smallint");
b.Property<byte>("status")
.HasColumnType("tinyint");
b.Property<string>("tmpPackNo")
.HasColumnType("varchar(20)");
b.Property<DateTime?>("valmdate");
b.Property<string>("valuser")
.HasColumnType("nvarchar(20)");
b.HasKey("Guid");
b.ToTable("TmpItemBoards");
});
modelBuilder.Entity("DncZeus.Api.Entities.Tmp.TmpItemBoardsH", b =>
{
b.Property<Guid>("Guid")
.ValueGeneratedOnAdd();
b.Property<int>("Org");
b.Property<short>("bagqty")
.HasColumnType("smallint");
b.Property<string>("barCode")
.HasColumnType("varchar(50)");
b.Property<string>("batchNum")
.HasColumnType("varchar(20)");
b.Property<short>("boardqty")
.HasColumnType("smallint");
b.Property<DateTime?>("cfmdate");
b.Property<string>("cfmuser")
.HasColumnType("nvarchar(20)");
b.Property<DateTime?>("credate");
b.Property<string>("creuser")
.HasColumnType("nvarchar(20)");
b.Property<int>("fOrdQty");
b.Property<string>("fPackNo")
.HasColumnType("varchar(20)");
b.Property<string>("fgoodscode")
.HasColumnType("varchar(50)");
b.Property<string>("fgoodsname")
.HasColumnType("nvarchar(150)");
b.Property<string>("fmono")
.HasColumnType("varchar(50)");
b.Property<string>("fordno")
.HasColumnType("varchar(20)");
b.Property<string>("imageNo")
.HasColumnType("varchar(50)");
b.Property<int>("ordQty");
b.Property<short>("spqty")
.HasColumnType("smallint");
b.Property<byte>("spstatus")
.HasColumnType("tinyint");
b.Property<byte>("status")
.HasColumnType("tinyint");
b.Property<string>("tmpPackNo")
.HasColumnType("varchar(20)");
b.Property<string>("trno")
.HasColumnType("varchar(20)");
b.Property<int>("trseq");
b.Property<short>("unbagqty")
.HasColumnType("smallint");
b.HasKey("Guid");
b.ToTable("TmpItemBoardsH");
});
modelBuilder.Entity("DncZeus.Api.Entities.Tmp.TmpItemBoardsMid", b =>
{
b.Property<Guid>("Guid")
.ValueGeneratedOnAdd();
b.Property<int>("Org");
b.Property<string>("barCode")
.HasColumnType("varchar(50)");
b.Property<string>("batchNum")
.HasColumnType("varchar(20)");
b.Property<int>("boardQty");
b.Property<byte>("boardType")
.HasColumnType("tinyint");
b.Property<string>("boardcode")
.HasColumnType("varchar(30)");
b.Property<string>("boardname")
.HasColumnType("varchar(200)");
b.Property<short>("boardnum")
.HasColumnType("smallint");
b.Property<string>("boardsize")
.HasColumnType("varchar(100)");
b.Property<DateTime?>("cfmdate");
b.Property<string>("cfmuser")
.HasColumnType("nvarchar(20)");
b.Property<DateTime?>("credate");
b.Property<string>("creuser")
.HasColumnType("nvarchar(20)");
b.Property<string>("fBarcode")
.HasColumnType("varchar(20)");
b.Property<int>("fGoodsID")
.HasColumnType("int");
b.Property<int>("fOrdQty");
b.Property<string>("fPackNo")
.HasColumnType("varchar(20)");
b.Property<string>("fgoodscode")
.HasColumnType("varchar(50)");
b.Property<string>("fgoodsname")
.HasColumnType("nvarchar(150)");
b.Property<string>("fmono")
.HasColumnType("varchar(50)");
b.Property<string>("fordno")
.HasColumnType("varchar(50)");
b.Property<string>("fspname")
.HasColumnType("nvarchar(150)");
b.Property<string>("imageNo")
.HasColumnType("varchar(50)");
b.Property<byte>("isSplit")
.HasColumnType("tinyint");
b.Property<byte>("isValid")
.HasColumnType("tinyint");
b.Property<short>("lprintnum")
.HasColumnType("smallint");
b.Property<DateTime?>("moddate");
b.Property<string>("moduser")
.HasColumnType("nvarchar(20)");
b.Property<string>("packIndex")
.HasColumnType("varchar(20)");
b.Property<short>("packQty")
.HasColumnType("smallint");
b.Property<int>("rowIndex");
b.Property<byte>("status")
.HasColumnType("tinyint");
b.Property<DateTime?>("valmdate");
b.Property<string>("valuser")
.HasColumnType("nvarchar(20)");
b.HasKey("Guid");
b.ToTable("TmpItemBoardsMid");
});
modelBuilder.Entity("DncZeus.Api.Entities.Weixin.WeiXinCases", b =>
{
b.Property<Guid>("Guid")
.ValueGeneratedOnAdd();
b.Property<string>("CaseName")
.HasColumnType("varchar(50)");
b.Property<string>("CaseSketch")
.HasColumnType("varchar(100)");
b.Property<string>("Catalog")
.HasColumnType("varchar(20)");
b.Property<string>("HtmlContent")
.HasColumnType("nvarchar(MAX)");
b.Property<int>("OrgID");
b.Property<DateTime?>("cfmdate");
b.Property<string>("cfmuser")
.HasColumnType("nvarchar(20)");
b.Property<DateTime?>("credate");
b.Property<string>("creuser")
.HasColumnType("nvarchar(20)");
b.Property<string>("homeShow")
.HasColumnType("char(1)");
b.Property<DateTime?>("moddate");
b.Property<string>("moduser")
.HasColumnType("nvarchar(20)");
b.Property<string>("pathUrl")
.HasColumnType("varchar(200)");
b.Property<string>("status")
.HasColumnType("char(1)");
b.HasKey("Guid");
b.ToTable("WeiXinCases");
});
modelBuilder.Entity("DncZeus.Api.Entities.Weixin.WeiXinKnowledge", b =>
{
b.Property<Guid>("Guid")
.ValueGeneratedOnAdd();
b.Property<string>("CaseName")
.HasColumnType("varchar(50)");
b.Property<string>("CaseSketch")
.HasColumnType("varchar(100)");
b.Property<string>("Catalog")
.HasColumnType("varchar(20)");
b.Property<string>("HtmlContent")
.HasColumnType("nvarchar(MAX)");
b.Property<int>("OrgID");
b.Property<DateTime?>("cfmdate");
b.Property<string>("cfmuser")
.HasColumnType("nvarchar(20)");
b.Property<DateTime?>("credate");
b.Property<string>("creuser")
.HasColumnType("nvarchar(20)");
b.Property<DateTime?>("moddate");
b.Property<string>("moduser")
.HasColumnType("nvarchar(20)");
b.Property<string>("pathUrl")
.HasColumnType("varchar(200)");
b.Property<string>("status")
.HasColumnType("char(1)");
b.HasKey("Guid");
b.ToTable("WeiXinKnowledge");
});
modelBuilder.Entity("DncZeus.Api.Entities.Weixin.WeiXinKnowledgePower", b =>
{
b.Property<Guid>("Guid")
.ValueGeneratedOnAdd();
b.Property<string>("candown")
.HasColumnType("char(1)");
b.Property<DateTime?>("credate");
b.Property<string>("creuser")
.HasColumnType("nvarchar(20)");
b.Property<Guid?>("knowledgeGuid");
b.Property<string>("userno")
.HasColumnType("varchar(10)");
b.Property<string>("usetype")
.HasColumnType("char(1)");
b.HasKey("Guid");
b.ToTable("WeiXinKnowledgePower");
});
modelBuilder.Entity("DncZeus.Api.Entities.Weixin.WeiXinNews", b =>
{
b.Property<Guid>("Guid")
.ValueGeneratedOnAdd();
b.Property<string>("HtmlContent")
.HasColumnType("nvarchar(MAX)");
b.Property<string>("NewsName")
.HasColumnType("varchar(50)");
b.Property<string>("NewsSketch")
.HasColumnType("varchar(100)");
b.Property<int>("OrgID");
b.Property<DateTime?>("cfmdate");
b.Property<string>("cfmuser")
.HasColumnType("nvarchar(20)");
b.Property<DateTime?>("credate");
b.Property<string>("creuser")
.HasColumnType("nvarchar(20)");
b.Property<string>("isRoll")
.HasColumnType("char(1)");
b.Property<DateTime?>("moddate");
b.Property<string>("moduser")
.HasColumnType("nvarchar(20)");
b.Property<string>("pathUrl")
.HasColumnType("varchar(200)");
b.Property<string>("status")
.HasColumnType("char(1)");
b.Property<string>("type")
.HasColumnType("char(1)");
b.HasKey("Guid");
b.ToTable("WeiXinNews");
});
modelBuilder.Entity("DncZeus.Api.Entities.DncPermission", b =>
{
b.HasOne("DncZeus.Api.Entities.DncMenu", "Menu")
.WithMany("Permissions")
.HasForeignKey("MenuGuid")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("DncZeus.Api.Entities.DncRolePermissionMapping", b =>
{
b.HasOne("DncZeus.Api.Entities.DncPermission", "DncPermission")
.WithMany("Roles")
.HasForeignKey("PermissionCode")
.OnDelete(DeleteBehavior.Restrict);
b.HasOne("DncZeus.Api.Entities.DncRole", "DncRole")
.WithMany("Permissions")
.HasForeignKey("RoleCode")
.OnDelete(DeleteBehavior.Restrict);
});
modelBuilder.Entity("DncZeus.Api.Entities.DncUserRoleMapping", b =>
{
b.HasOne("DncZeus.Api.Entities.DncRole", "DncRole")
.WithMany("UserRoles")
.HasForeignKey("RoleCode")
.OnDelete(DeleteBehavior.Restrict);
b.HasOne("DncZeus.Api.Entities.DncUser", "DncUser")
.WithMany("UserRoles")
.HasForeignKey("UserGuid")
.OnDelete(DeleteBehavior.Restrict);
});
modelBuilder.Entity("DncZeus.Api.Entities.MisCkind", b =>
{
b.HasOne("DncZeus.Api.Entities.MisCatalog", "MisCatalog")
.WithMany()
.HasForeignKey("MisCatalogID");
});
modelBuilder.Entity("DncZeus.Api.Entities.MisCode", b =>
{
b.HasOne("DncZeus.Api.Entities.MisCkind", "MisCkind")
.WithMany()
.HasForeignKey("MisCkindID");
b.HasOne("DncZeus.Api.Entities.MisOrganization", "MisOrganization")
.WithMany()
.HasForeignKey("MisOrganizationID");
});
modelBuilder.Entity("DncZeus.Api.Entities.TechItemmAttachment", b =>
{
b.HasOne("DncZeus.Api.Entities.MisAttachment", "MisAttachment")
.WithMany()
.HasForeignKey("MisAttachmentGuid");
b.HasOne("DncZeus.Api.Entities.TechItemMaster", "TechItemMaster")
.WithMany()
.HasForeignKey("TechItemMasterGuid");
});
modelBuilder.Entity("DncZeus.Api.Entities.Tmp.TmpItembarLine", b =>
{
b.HasOne("DncZeus.Api.Entities.Tmp.TmpItembarHead", "ItembarHead")
.WithMany()
.HasForeignKey("ItembarHeadGuid");
});
#pragma warning restore 612, 618
}
}
}
| 32.924564 | 155 | 0.423557 | [
"MIT"
] | yujunnan666666/DncZeusApi | DncZeus.Api/Migrations/20200518091509_MyMigration76.Designer.cs | 86,857 | C# |
using Video.Pages.Services;
using System.Collections.Generic;
namespace Video.Pages.Models
{
public class OtherFeaturesModel
{
public string Title { get; set; }
public string TitleSub { get; set; }
public List<OtherFeaturesItem> Items { get; set; }
}
public class OtherFeaturesItem
{
/// <summary>
/// Url for anchor
/// </summary>
public string URL { get; set; }
/// <summary>
/// Title
/// </summary>
public string Title { get; set; }
/// <summary>
/// TitleSub
/// </summary>
public string TitleSub { get; set; }
public OtherFeaturesItem(string url, string title, string format)
{
URL = url.ToLower();
Title = title.ToUpper();
var fileFormat = AppExtensionResource.GetResource(format);
if (fileFormat == null)
{
TitleSub = Title;
}
else
{
TitleSub = fileFormat.name;
}
}
}
}
| 22.770833 | 73 | 0.501372 | [
"MIT"
] | aspose-video/Aspose.Video-Conversion-App | Video.Pages/Models/OtherFeaturesModel.cs | 1,093 | C# |
// ******************************************************************
// Copyright � 2015-2018 nventive inc. All rights reserved.
//
// Licensed 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.
//
// ******************************************************************
#if !SILVERLIGHT || (SILVERLIGHT && WINDOWS_PHONE)
using System;
using System.Threading;
using System.Threading.Tasks;
namespace Uno.Extensions
{
internal static partial class FuncExtensions
{
public static async Task<T> Retry<T>(this Func<Task<T>> selector, int tries = 3, TimeSpan? retryDelay = null)
{
do
{
try
{
return await selector();
}
catch (Exception)
{
if (--tries == 0)
{
throw;
}
}
await Task.Delay(retryDelay ?? TimeSpan.FromMilliseconds(100));
}
while (true);
}
public static async Task<T> Retry<T>(this Func<CancellationToken, Task<T>> selector, CancellationToken ct, int tries = 3, TimeSpan? retryDelay = null)
{
do
{
try
{
return await selector(ct);
}
catch (Exception)
{
if (--tries == 0)
{
throw;
}
}
await Task.Delay(retryDelay ?? TimeSpan.FromMilliseconds(100), ct);
}
while (true);
}
public static async Task Retry(this Func<Task> action, int tries = 3, TimeSpan? retryDelay = null)
{
do
{
try
{
await action();
return;
}
catch (Exception)
{
if (--tries == 0)
{
throw;
}
}
await Task.Delay(retryDelay ?? TimeSpan.FromMilliseconds(100));
}
while (true);
}
public static async Task Retry(this Func<CancellationToken, Task> action, CancellationToken ct, int tries = 3, TimeSpan? retryDelay = null)
{
do
{
try
{
await action(ct);
return;
}
catch (Exception)
{
if (--tries == 0)
{
throw;
}
}
await Task.Delay(retryDelay ?? TimeSpan.FromMilliseconds(100), ct);
}
while (true);
}
}
}
#endif | 21.911504 | 152 | 0.586026 | [
"Apache-2.0"
] | AbdalaMask/uno | src/Uno.Foundation/Uno.Core.Extensions/Uno.Core.Extensions/FuncExtensions.AsyncRetry.cs | 2,478 | C# |
namespace BudgetAnalyser.Engine.Widgets
{
/// <summary>
/// Represents a frequency
/// </summary>
public enum WeeklyOrFortnightly
{
/// <summary>
/// Occurs weekly
/// </summary>
Weekly,
/// <summary>
/// Occurs fortnightly
/// </summary>
Fortnightly
}
} | 19.777778 | 40 | 0.485955 | [
"MIT"
] | Benrnz/BudgetAnalyser | BudgetAnalyser.Engine/Widgets/WeeklyOrFortnightly.cs | 358 | C# |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
namespace Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime
{
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Net.Http;
using System.Linq;
using System.Net;
using Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.Json;
public enum MockMode
{
Live,
Record,
Playback,
}
public class PipelineMock
{
private System.Collections.Generic.Stack<string> scenario = new System.Collections.Generic.Stack<string>();
private System.Collections.Generic.Stack<string> context = new System.Collections.Generic.Stack<string>();
private System.Collections.Generic.Stack<string> description = new System.Collections.Generic.Stack<string>();
private readonly string recordingPath;
private int counter = 0;
public static implicit operator Microsoft.Azure.PowerShell.Cmdlets.Compute.Runtime.SendAsyncStep(PipelineMock instance) => instance.SendAsync;
public MockMode Mode { get; set; } = MockMode.Live;
public PipelineMock(string recordingPath)
{
this.recordingPath = recordingPath;
}
public void PushContext(string text) => context.Push(text);
public void PushDescription(string text) => description.Push(text);
public void PushScenario(string it)
{
// reset counter too
counter = 0;
scenario.Push(it);
}
public void PopContext() => context.Pop();
public void PopDescription() => description.Pop();
public void PopScenario() => scenario.Pop();
public void SetRecord() => Mode = MockMode.Record;
public void SetPlayback() => Mode = MockMode.Playback;
public void SetLive() => Mode = MockMode.Live;
public string Scenario => (scenario.Count > 0 ? scenario.Peek() : "[NoScenario]");
public string Description => (description.Count > 0 ? description.Peek() : "[NoDescription]");
public string Context => (context.Count > 0 ? context.Peek() : "[NoContext]");
/// <summary>
/// Headers that we substitute out blank values for in the recordings
/// Add additional headers as necessary
/// </summary>
public static HashSet<string> Blacklist = new HashSet<string>(System.StringComparer.CurrentCultureIgnoreCase) {
"Authorization",
};
public Dictionary<string, string> ForceResponseHeaders = new Dictionary<string, string>();
internal static XImmutableArray<string> Removed = new XImmutableArray<string>(new string[] { "[Filtered]" });
internal static IEnumerable<KeyValuePair<string, JsonNode>> FilterHeaders(IEnumerable<KeyValuePair<string, IEnumerable<string>>> headers) => headers.Select(header => new KeyValuePair<string, JsonNode>(header.Key, Blacklist.Contains(header.Key) ? Removed : new XImmutableArray<string>(header.Value.ToArray())));
internal static JsonNode SerializeContent(HttpContent content, ref bool isBase64) => content == null ? XNull.Instance : SerializeContent(content.ReadAsByteArrayAsync().Result, ref isBase64);
internal static JsonNode SerializeContent(byte[] content, ref bool isBase64)
{
if (null == content || content.Length == 0)
{
return XNull.Instance;
}
var first = content[0];
var last = content[content.Length - 1];
// plaintext for JSON/SGML/XML/HTML/STRINGS/ARRAYS
if ((first == '{' && last == '}') || (first == '<' && last == '>') || (first == '[' && last == ']') || (first == '"' && last == '"'))
{
return new JsonString(System.Text.Encoding.UTF8.GetString(content));
}
// base64 for everyone else
return new JsonString(System.Convert.ToBase64String(content));
}
internal static byte[] DeserializeContent(string content, bool isBase64)
{
if (string.IsNullOrWhiteSpace(content))
{
return new byte[0];
}
if (isBase64)
{
try
{
return System.Convert.FromBase64String(content);
}
catch
{
// hmm. didn't work, return it as a string I guess.
}
}
return System.Text.Encoding.UTF8.GetBytes(content);
}
public void SaveMessage(string rqKey, HttpRequestMessage request, HttpResponseMessage response)
{
var messages = System.IO.File.Exists(this.recordingPath) ? Load() : new JsonObject() ?? new JsonObject();
bool isBase64Request = false;
bool isBase64Response = false;
messages[rqKey] = new JsonObject {
{ "Request",new JsonObject {
{ "Method", request.Method.Method },
{ "RequestUri", request.RequestUri },
{ "Content", SerializeContent( request.Content, ref isBase64Request) },
{ "isContentBase64", isBase64Request },
{ "Headers", new JsonObject(FilterHeaders(request.Headers)) },
{ "ContentHeaders", request.Content == null ? new JsonObject() : new JsonObject(FilterHeaders(request.Content.Headers))}
} },
{"Response", new JsonObject {
{ "StatusCode", (int)response.StatusCode},
{ "Headers", new JsonObject(FilterHeaders(response.Headers))},
{ "ContentHeaders", new JsonObject(FilterHeaders(response.Content.Headers))},
{ "Content", SerializeContent(response.Content, ref isBase64Response) },
{ "isContentBase64", isBase64Response },
}}
};
System.IO.File.WriteAllText(this.recordingPath, messages.ToString());
}
private JsonObject Load()
{
if (System.IO.File.Exists(this.recordingPath))
{
try
{
return JsonObject.FromStream(System.IO.File.OpenRead(this.recordingPath));
}
catch
{
throw new System.Exception($"Invalid recording file: '{recordingPath}'");
}
}
throw new System.ArgumentException($"Missing recording file: '{recordingPath}'", nameof(recordingPath));
}
public HttpResponseMessage LoadMessage(string rqKey)
{
var responses = Load();
var message = responses.Property(rqKey);
if (null == message)
{
throw new System.ArgumentException($"Missing Request '{rqKey}' in recording file", nameof(rqKey));
}
var sc = 0;
var reqMessage = message.Property("Request");
var respMessage = message.Property("Response");
// --------------------------- deserialize response ----------------------------------------------------------------
bool isBase64Response = false;
respMessage.BooleanProperty("isContentBase64", ref isBase64Response);
var response = new HttpResponseMessage
{
StatusCode = (HttpStatusCode)respMessage.NumberProperty("StatusCode", ref sc),
Content = new System.Net.Http.ByteArrayContent(DeserializeContent(respMessage.StringProperty("Content"), isBase64Response))
};
foreach (var each in respMessage.Property("Headers"))
{
response.Headers.TryAddWithoutValidation(each.Key, each.Value.ToArrayOf<string>());
}
foreach (var frh in ForceResponseHeaders)
{
response.Headers.Remove(frh.Key);
response.Headers.TryAddWithoutValidation(frh.Key, frh.Value);
}
foreach (var each in respMessage.Property("ContentHeaders"))
{
response.Content.Headers.TryAddWithoutValidation(each.Key, each.Value.ToArrayOf<string>());
}
// --------------------------- deserialize request ----------------------------------------------------------------
bool isBase64Request = false;
reqMessage.BooleanProperty("isContentBase64", ref isBase64Request);
response.RequestMessage = new HttpRequestMessage
{
Method = new HttpMethod(reqMessage.StringProperty("Method")),
RequestUri = new System.Uri(reqMessage.StringProperty("RequestUri")),
Content = new System.Net.Http.ByteArrayContent(DeserializeContent(reqMessage.StringProperty("Content"), isBase64Request))
};
foreach (var each in reqMessage.Property("Headers"))
{
response.RequestMessage.Headers.TryAddWithoutValidation(each.Key, each.Value.ToArrayOf<string>());
}
foreach (var each in reqMessage.Property("ContentHeaders"))
{
response.RequestMessage.Content.Headers.TryAddWithoutValidation(each.Key, each.Value.ToArrayOf<string>());
}
return response;
}
public async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, IEventListener callback, ISendAsync next)
{
counter++;
var rqkey = $"{Description}+{Context}+{Scenario}+${request.Method.Method}+{request.RequestUri}+{counter}";
switch (Mode)
{
case MockMode.Record:
//Add following code since the request.Content will be released after sendAsync
var requestClone = request;
if (requestClone.Content != null)
{
requestClone = await request.CloneWithContent(request.RequestUri, request.Method);
}
// make the call
var response = await next.SendAsync(request, callback);
// save the message to the recording file
SaveMessage(rqkey, requestClone, response);
// return the response.
return response;
case MockMode.Playback:
// load and return the response.
return LoadMessage(rqkey);
default:
// pass-thru, do nothing
return await next.SendAsync(request, callback);
}
}
}
} | 42.946565 | 319 | 0.550835 | [
"MIT"
] | Agazoth/azure-powershell | src/Compute/Compute.Autorest/generated/runtime/PipelineMocking.cs | 10,991 | C# |
// Copyright (c) rubicon IT GmbH, www.rubicon.eu
//
// See the NOTICE file distributed with this work for additional information
// regarding copyright ownership. rubicon 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.
//
using System;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using Remotion.Utilities;
namespace Core.Arango.Relinq.Parsing.Structure.IntermediateModel
{
/// <summary>
/// Creates instances of classes implementing the <see cref="IExpressionNode" /> interface via Reflection.
/// </summary>
/// <remarks>
/// The classes implementing <see cref="IExpressionNode" /> instantiated by this factory must implement a single
/// constructor. The source and
/// constructor parameters handed to the <see cref="CreateExpressionNode" /> method are passed on to the constructor;
/// for each argument where no
/// parameter is passed, <see langword="null" /> is passed to the constructor.
/// </remarks>
internal static class MethodCallExpressionNodeFactory
{
/// <summary>
/// Creates an instace of type <paramref name="nodeType" />.
/// </summary>
/// <exception cref="ExpressionNodeInstantiationException">
/// Thrown if the <paramref name="parseInfo" /> or the <paramref name="additionalConstructorParameters" />
/// do not match expected constructor parameters of the <paramref name="nodeType" />.
/// </exception>
public static IExpressionNode CreateExpressionNode(
Type nodeType, MethodCallExpressionParseInfo parseInfo, object[] additionalConstructorParameters)
{
ArgumentUtility.CheckNotNull("nodeType", nodeType);
ArgumentUtility.CheckTypeIsAssignableFrom("nodeType", nodeType, typeof(IExpressionNode));
ArgumentUtility.CheckNotNull("additionalConstructorParameters", additionalConstructorParameters);
var constructors = nodeType.GetTypeInfo().DeclaredConstructors.Where(c => c.IsPublic).ToArray();
if (constructors.Length > 1)
{
var message = string.Format(
"Expression node type '{0}' contains too many constructors. It must only contain a single constructor, allowing null to be passed for any optional arguments.",
nodeType.FullName);
throw new ArgumentException(message, "nodeType");
}
var constructorParameterArray =
GetParameterArray(constructors[0], parseInfo, additionalConstructorParameters);
try
{
return (IExpressionNode) constructors[0].Invoke(constructorParameterArray);
}
catch (ArgumentException ex)
{
var message = GetArgumentMismatchMessage(ex);
throw new ExpressionNodeInstantiationException(message);
}
}
private static string GetArgumentMismatchMessage(ArgumentException ex)
{
if (ex.Message.Contains(typeof(LambdaExpression).Name) &&
ex.Message.Contains(typeof(ConstantExpression).Name))
return string.Format(
"{0} If you tried to pass a delegate instead of a LambdaExpression, this is not supported because delegates are not parsable expressions.",
ex.Message);
return string.Format("The given arguments did not match the expected arguments: {0}", ex.Message);
}
private static object[] GetParameterArray(
ConstructorInfo nodeTypeConstructor, MethodCallExpressionParseInfo parseInfo,
object[] additionalConstructorParameters)
{
var parameterInfos = nodeTypeConstructor.GetParameters();
if (additionalConstructorParameters.Length > parameterInfos.Length - 1)
{
var message = string.Format(
"The constructor of expression node type '{0}' only takes {1} parameters, but you specified {2} (including the parse info parameter).",
nodeTypeConstructor.DeclaringType.FullName,
parameterInfos.Length,
additionalConstructorParameters.Length + 1);
throw new ExpressionNodeInstantiationException(message);
}
var constructorParameters = new object[parameterInfos.Length];
constructorParameters[0] = parseInfo;
additionalConstructorParameters.CopyTo(constructorParameters, 1);
return constructorParameters;
}
}
} | 49.219048 | 179 | 0.658475 | [
"Apache-2.0"
] | ASolomatin/dotnet-arangodb | Core.Arango/Relinq/Parsing/Structure/IntermediateModel/MethodCallExpressionNodeFactory.cs | 5,168 | C# |
namespace Core.Entities
{
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.Spatial;
[Table("ActividadesPorProceso")]
public partial class ActividadesPorProceso
{
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
public ActividadesPorProceso()
{
Notificaciones = new HashSet<Notificaciones>();
}
[Key]
public int idActividadProceso { get; set; }
public int? idProceso_Proyecto { get; set; }
public int? idInfoAdicional { get; set; }
public DateTime FechaIncio { get; set; }
public DateTime FechaPromesa { get; set; }
public DateTime FechaEntrega { get; set; }
public bool EstadoActividadProceso { get; set; }
public virtual InformacionAdicional InformacionAdicional { get; set; }
public virtual ProcesosPorProyecto ProcesosPorProyecto { get; set; }
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
public virtual ICollection<Notificaciones> Notificaciones { get; set; }
}
}
| 32.170732 | 128 | 0.693707 | [
"MIT"
] | eliraEsFlo/RazorWebForm | RequerimientosPro/Core/Entities/ActividadesPorProceso.cs | 1,319 | C# |
// Plato.Core
// Copyright (c) 2020 ReflectSoftware Inc.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Plato.Cache;
using Plato.Cache.Interfaces;
using Plato.Miscellaneous;
using Plato.Messaging.AMQ.Interfaces;
using Plato.Messaging.AMQ.Settings;
using System;
namespace Plato.Messaging.AMQ.Pool
{
/// <summary>
///
/// </summary>
/// <seealso cref="System.IDisposable" />
public abstract class AMQPoolBase : IDisposable
{
protected class ConfigStates
{
public AMQConnectionSettings Connection { get; set; }
public AMQDestinationSettings Destination { get; set; }
}
private bool _disposed;
protected readonly int _maxGrowSize;
protected readonly ILocalMemoryCache _cache;
protected readonly IAMQConfigurationManager _configurationManager;
protected readonly IAMQSenderReceiverFactory _factory;
/// <summary>
/// Initializes a new instance of the <see cref="AMQPoolBase"/> class.
/// </summary>
/// <param name="configurationManager">The configuration manager.</param>
/// <param name="factory">The factory.</param>
/// <param name="maxGrowSize">Maximum size of the grow.</param>
public AMQPoolBase(
IAMQConfigurationManager configurationManager,
IAMQSenderReceiverFactory factory,
int maxGrowSize)
{
Guard.AgainstNull(() => configurationManager);
Guard.AgainstNull(() => factory);
_disposed = false;
_cache = new LocalMemoryCache();
_maxGrowSize = maxGrowSize;
_configurationManager = configurationManager;
_factory = factory;
}
/// <summary>
/// Verifies the pool states.
/// </summary>
/// <param name="connectionName">Name of the connection.</param>
/// <param name="queueName">Name of the queue.</param>
/// <returns></returns>
/// <exception cref="Exception">
/// </exception>
protected ConfigStates VerifyPoolStates(string connectionName, string queueName)
{
var states = new ConfigStates
{
Connection = _configurationManager.GetConnectionSettings(connectionName),
Destination = _configurationManager.GetDestinationSettings(queueName),
};
if (string.IsNullOrWhiteSpace(states.Connection.Uri))
{
throw new Exception($"Connection: {connectionName} is not configured or is missing from configuration.");
}
if (string.IsNullOrWhiteSpace(states.Destination.Path))
{
throw new Exception($"Queue: {queueName} is not configured or is missing from configuration.");
}
return states;
}
#region Dispose
/// <summary>
/// Finalizes an instance of the <see cref="AMQPoolBase"/> class.
/// </summary>
~AMQPoolBase()
{
Dispose(false);
}
/// <summary>
/// Releases unmanaged and - optionally - managed resources.
/// </summary>
/// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
protected void Dispose(bool disposing)
{
lock (this)
{
if (!_disposed)
{
_disposed = true;
GC.SuppressFinalize(this);
_cache?.Dispose();
}
}
}
/// <summary>
/// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
/// </summary>
public void Dispose()
{
Dispose(true);
}
#endregion Dispose
}
}
| 34.10084 | 154 | 0.577132 | [
"Apache-2.0"
] | fntc/Plato.Core | src/Plato.Messaging.AMQ/Pool/AMQPoolBase.cs | 4,060 | C# |
using System;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
[assembly: XamlCompilation(XamlCompilationOptions.Compile)]
namespace XFFontAwesome
{
public partial class App : Application
{
public App()
{
InitializeComponent();
MainPage = new MainPage();
}
protected override void OnStart()
{
// Handle when your app starts
}
protected override void OnSleep()
{
// Handle when your app sleeps
}
protected override void OnResume()
{
// Handle when your app resumes
}
}
}
| 19.454545 | 59 | 0.556075 | [
"MIT"
] | devoirtechsandip/xf-fontawesome | XFFontAwesome/XFFontAwesome/XFFontAwesome/App.xaml.cs | 644 | C# |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Collections.Immutable;
using System.Linq;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Editor.Wpf;
using Microsoft.CodeAnalysis.InheritanceMargin;
using Microsoft.VisualStudio.Imaging.Interop;
using Roslyn.Utilities;
namespace Microsoft.VisualStudio.LanguageServices.Implementation.InheritanceMargin.MarginGlyph
{
/// <summary>
/// View model used to display a member in MenuItem. Only used when there are multiple members on the same line.
/// e.g.
/// interface IBar
/// {
/// event EventHandler e1, e2
/// }
/// public class Bar : IBar
/// {
/// public event EventHandler e1, e2
/// }
/// And this view model is used to show the first level entry to let the user choose member.
/// </summary>
internal class MemberMenuItemViewModel : InheritanceMenuItemViewModel
{
/// <summary>
/// Inheritance Targets for this member.
/// </summary>
public ImmutableArray<InheritanceMenuItemViewModel> Targets { get; }
public MemberMenuItemViewModel(
string displayContent,
ImageMoniker imageMoniker,
string automationName,
ImmutableArray<InheritanceMenuItemViewModel> targets) : base(displayContent, imageMoniker, automationName)
{
Targets = targets;
}
public static MemberMenuItemViewModel CreateWithHeaderInTargets(InheritanceMarginItem member)
{
var displayName = member.DisplayTexts.JoinText();
var targetsByRelationship = member.TargetItems
.OrderBy(item => item.DisplayName)
.GroupBy(target => target.RelationToMember)
.SelectMany(grouping => InheritanceMarginHelpers.CreateMenuItemsWithHeader(grouping.Key, grouping))
.ToImmutableArray();
return new MemberMenuItemViewModel(
displayName,
member.Glyph.GetImageMoniker(),
displayName,
targetsByRelationship);
}
}
}
| 37.213115 | 118 | 0.662996 | [
"MIT"
] | 333fred/roslyn | src/VisualStudio/Core/Def/Implementation/InheritanceMargin/MarginGlyph/MemberMenuItemViewModel.cs | 2,272 | C# |
using ApiApproverTests.Examples;
using Xunit;
namespace ApiApproverTests
{
public class Delegate_types : ApiGeneratorTestsBase
{
[Fact]
public void Should_output_void_delegate()
{
AssertPublicApi<VoidDelegate>(
@"namespace ApiApproverTests.Examples
{
public delegate void VoidDelegate();
}");
}
[Fact]
public void Should_output_primitive_types()
{
AssertPublicApi<DelegateWithPrimitiveParameters>(
@"namespace ApiApproverTests.Examples
{
public delegate int DelegateWithPrimitiveParameters(int v1, string v2);
}");
}
[Fact]
public void Should_output_fully_qualified_name_for_complex_types()
{
AssertPublicApi<DelegateWithComplexParameters>(
@"namespace ApiApproverTests.Examples
{
public delegate ApiApproverTests.Examples.ComplexType DelegateWithComplexParameters(ApiApproverTests.Examples.ComplexType v1);
}");
}
[Fact]
public void Should_output_fully_qualified_names_for_generic_types()
{
AssertPublicApi(typeof(DelegateWithClosedGenericParameters),
@"namespace ApiApproverTests.Examples
{
public delegate ApiApproverTests.Examples.GenericType<int> DelegateWithClosedGenericParameters(ApiApproverTests.Examples.GenericType<ApiApproverTests.Examples.ComplexType> value);
}");
}
[Fact]
public void Should_output_generic_type_parameters()
{
AssertPublicApi(typeof(DelegateWithGenericParameters<>),
@"namespace ApiApproverTests.Examples
{
public delegate ApiApproverTests.Examples.GenericType<T> DelegateWithGenericParameters<T>(ApiApproverTests.Examples.GenericType<T> value);
}");
}
}
namespace Examples
{
public delegate void VoidDelegate();
public delegate int DelegateWithPrimitiveParameters(int v1, string v2);
public delegate ComplexType DelegateWithComplexParameters(ComplexType v1);
public delegate GenericType<int> DelegateWithClosedGenericParameters(GenericType<ComplexType> value);
public delegate GenericType<T> DelegateWithGenericParameters<T>(GenericType<T> value);
}
} | 32.746269 | 183 | 0.726071 | [
"MIT"
] | heynickc/ApiApprover | src/ApiApproverTests/Delegate_types.cs | 2,196 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
namespace LinearAssignment
{
/// <summary>
/// Solver for the linear assignment problem based on shortest augmenting paths. Concretely,
/// we implement the pseudo-code from
///
/// DF Crouse. On implementing 2D rectangular assignment algorithms.
/// IEEE Transactions on Aerospace and Electronic Systems
/// 52(4):1679-1696, August 2016
/// doi: 10.1109/TAES.2016.140952
///
/// which in turn is based closely on Section 4.4 of
///
/// Rainer Burkard, Mauro Dell'Amico, Silvano Martello.
/// Assignment Problems - Revised Reprint
/// Society for Industrial and Applied Mathematics, Philadelphia, 2012
///
/// This is a C# port of the C++ implementation of the algorithm by Peter Mahler Larsen included
/// in the Python library scipy.optimize. https://github.com/scipy/scipy/pull/10296/
///
/// The solver for sparse inputs is what is referred to as LAPJVsp, which was described in
///
/// R. Jonker and A. Volgenant. A Shortest Augmenting Path Algorithm for
/// Dense and Sparse Linear Assignment Problems. *Computing*, 38:325-340
/// December 1987.
///
/// and our implementation is a port of the Pascal code currently available at
/// http://www.assignmentproblems.com/LAPJV.htm
/// All comments from the original code are preserved.
/// </summary>
public class ShortestPathSolver : ISolver
{
public Assignment Solve(double[,] cost)
{
var nr = cost.GetLength(0);
var nc = cost.GetLength(1);
// Initialize working arrays
var u = new double[nr];
var v = new double[nc];
var shortestPathCosts = new double[nc];
var path = Enumerable.Repeat(-1, nc).ToArray();
var x = Enumerable.Repeat(-1, nr).ToArray();
var y = Enumerable.Repeat(-1, nc).ToArray();
var sr = new bool[nr];
var sc = new bool[nc];
// Find a matching one vertex at a time
for (var curRow = 0; curRow < nr; curRow++)
{
double minVal = 0;
var i = curRow;
// Reset working arrays
var remaining = Enumerable.Repeat(0, nc).ToList();
var numRemaining = nc;
for (var jp = 0; jp < nc; jp++)
{
remaining[jp] = jp;
shortestPathCosts[jp] = double.PositiveInfinity;
}
Array.Clear(sr, 0, sr.Length);
Array.Clear(sc, 0, sc.Length);
// Start finding augmenting path
var sink = -1;
while (sink == -1)
{
sr[i] = true;
var indexLowest = -1;
var lowest = double.PositiveInfinity;
for (var jk = 0; jk < numRemaining; jk++)
{
var jl = remaining[jk];
// Note that this is the main bottleneck of this method; looking up the cost array
// is costly. Some obvious attempts to improve performance include swapping rows and
// columns, and disabling CLR bounds checking by using pointers to access the elements
// instead. We do not seem to get any significant improvements over the simpler
// approach below though.
var r = minVal + cost[i, jl] - u[i] - v[jl];
if (r < shortestPathCosts[jl])
{
path[jl] = i;
shortestPathCosts[jl] = r;
}
if (shortestPathCosts[jl] < lowest || shortestPathCosts[jl] == lowest && y[jl] == -1)
{
lowest = shortestPathCosts[jl];
indexLowest = jk;
}
}
minVal = lowest;
var jp = remaining[indexLowest];
if (double.IsPositiveInfinity(minVal))
throw new InvalidOperationException("No feasible solution.");
if (y[jp] == -1)
sink = jp;
else
i = y[jp];
sc[jp] = true;
remaining[indexLowest] = remaining[--numRemaining];
remaining.RemoveAt(numRemaining);
}
if (sink < 0)
throw new InvalidOperationException("No feasible solution.");
// Update dual variables
u[curRow] += minVal;
for (var ip = 0; ip < nr; ip++)
if (sr[ip] && ip != curRow)
u[ip] += minVal - shortestPathCosts[x[ip]];
for (var jp = 0; jp < nc; jp++)
if (sc[jp])
v[jp] -= minVal - shortestPathCosts[jp];
// Augment previous solution
var j = sink;
while (true)
{
var ip = path[j];
y[j] = ip;
var tmp = j;
j = x[ip];
x[ip] = tmp;
if (ip == curRow)
break;
}
}
return new AssignmentWithDuals(x, y, u, v);
}
public Assignment Solve(int[,] cost)
{
// Note that it would be possible to reimplement the above method using only
// integer arithmetic. Doing so does provide a very slight performance improvement
// but there's no nice way of implementing the method for ints and doubles at once
// without duplicating code or moving to something like T4 templates. This would
// work but would also increase the maintenance load, so for now we just keep this
// simple and use the floating-point version directly.
var nr = cost.GetLength(0);
var nc = cost.GetLength(1);
var doubleCost = new double[nr, nc];
for (var i = 0; i < nr; i++)
for (var j = 0; j < nc; j++)
{
doubleCost[i, j] = cost[i, j] == int.MaxValue ? double.PositiveInfinity : cost[i, j];
}
return Solve(doubleCost);
}
public Assignment Solve(SparseMatrixInt cost) =>
Solve(new SparseMatrixDouble(cost));
public Assignment Solve(SparseMatrixDouble cost)
{
var nr = cost.NumRows;
var nc = cost.NumColumns;
var v = new double[nc];
var x = Enumerable.Repeat(-1, nr).ToArray();
var y = Enumerable.Repeat(-1, nc).ToArray();
var u = new double[nr];
var d = new double[nc];
var ok = new bool[nc];
var xinv = new bool[nr];
var free = Enumerable.Repeat(-1, nr).ToArray();
var todo = Enumerable.Repeat(-1, nc).ToArray();
var lab = new int[nc];
var first = cost.IA;
var kk = cost.CA;
var cc = cost.A;
int l0;
// The initialization steps of LAPJVsp only make sense for square matrices
if (nr == nc)
{
for (var jp = 0; jp < nc; jp++)
v[jp] = double.PositiveInfinity;
for (var i = 0; i < nr; i++)
{
for (var t = first[i]; t < first[i + 1]; t++)
{
var jp = kk[t];
if (cc[t] < v[jp])
{
v[jp] = cc[t];
y[jp] = i;
}
}
}
for (var jp = nc - 1; jp >= 0; jp--)
{
var i = y[jp];
if (x[i] == -1) x[i] = jp;
else
{
y[jp] = -1;
// Here, the original Pascal code simply inverts the sign of x; as that
// doesn't play too well with zero-indexing, we explicitly keep track of
// uniqueness instead.
xinv[i] = true;
}
}
var lp = 0;
for (var i = 0; i < nr; i++)
{
if (xinv[i]) continue;
if (x[i] != -1)
{
var min = double.PositiveInfinity;
var j1 = x[i];
for (var t = first[i]; t < first[i + 1]; t++)
{
var jp = kk[t];
if (jp != j1)
{
if (cc[t] - v[jp] < min)
{
min = cc[t] - v[jp];
}
}
}
u[i] = min;
var tp = first[i];
while (kk[tp] != j1) tp++;
v[j1] = cc[tp] - min;
}
else
{
free[lp++] = i;
}
}
for (var tel = 0; tel < 2; tel++)
{
var h = 0;
var l0p = lp;
lp = 0;
while (h < l0p)
{
// Note: In the original Pascal code, the indices of the lowest
// and second-lowest reduced costs are never reset. This can
// cause issues for infeasible problems; see https://stackoverflow.com/q/62875232/5085211
var i = free[h++];
var j0p = -1;
var j1p = -1;
var v0 = double.PositiveInfinity;
var vj = double.PositiveInfinity;
for (var t = first[i]; t < first[i + 1]; t++)
{
var jp = kk[t];
var dj = cc[t] - v[jp];
if (dj < vj)
{
if (dj >= v0)
{
vj = dj;
j1p = jp;
}
else
{
vj = v0;
v0 = dj;
j1p = j0p;
j0p = jp;
}
}
}
// If the index of the column with the largest reduced cost has not been
// set, no assignment is possible for this row.
if (j0p < 0)
throw new InvalidOperationException("No feasible solution.");
var i0 = y[j0p];
u[i] = vj;
if (v0 < vj)
{
v[j0p] += v0 - vj;
}
else if (i0 != -1)
{
j0p = j1p;
i0 = y[j0p];
}
x[i] = j0p;
y[j0p] = i;
if (i0 != -1)
{
if (v0 < vj) free[--h] = i0;
else free[lp++] = i0;
}
}
}
l0 = lp;
}
else
{
l0 = nr;
for (int i = 0; i < nr; i++) free[i] = i;
}
var td1 = -1;
for (var l = 0; l < l0; l++)
{
td1 = SolveForOneL(l, nc, d, ok, free, first, kk, cc, v, lab, todo, y, x, td1);
}
return new Assignment(x, y);
}
private int SolveForOneL(int l, int nc, double[] d, bool[] ok, int[] free,
List<int> first, List<int> kk,
List<double> cc, double[] v, int[] lab, int[] todo, int[] y, int[] x, int td1)
{
for (var jp = 0; jp < nc; jp++)
{
d[jp] = double.PositiveInfinity;
ok[jp] = false;
}
var min = double.PositiveInfinity;
var i0 = free[l];
int j;
for (var t = first[i0]; t < first[i0 + 1]; t++)
{
j = kk[t];
var dj = cc[t] - v[j];
d[j] = dj;
lab[j] = i0;
if (dj <= min)
{
if (dj < min)
{
td1 = -1;
min = dj;
}
todo[++td1] = j;
}
}
for (var hp = 0; hp <= td1; hp++)
{
j = todo[hp];
if (y[j] == -1)
{
UpdateAssignments(lab, y, x, j, i0);
return td1;
}
ok[j] = true;
}
var td2 = nc - 1;
var last = nc;
while (true)
{
if (td1 < 0)
throw new InvalidOperationException("No feasible solution.");
var j0 = todo[td1--];
var i = y[j0];
todo[td2--] = j0;
var tp = first[i];
while (kk[tp] != j0) tp++;
var h = cc[tp] - v[j0] - min;
for (var t = first[i]; t < first[i + 1]; t++)
{
j = kk[t];
if (!ok[j])
{
var vj = cc[t] - v[j] - h;
if (vj < d[j])
{
d[j] = vj;
lab[j] = i;
if (vj == min)
{
if (y[j] == -1)
{
UpdateDual(nc, d, v, todo, last, min);
UpdateAssignments(lab, y, x, j, i0);
return td1;
}
todo[++td1] = j;
ok[j] = true;
}
}
}
}
if (td1 == -1)
{
// The original Pascal code uses finite numbers instead of double.PositiveInfinity
// so we need to adjust slightly here.
min = double.PositiveInfinity;
last = td2 + 1;
for (var jp = 0; jp < nc; jp++)
{
if (!double.IsPositiveInfinity(d[jp]) && d[jp] <= min && !ok[jp])
{
if (d[jp] < min)
{
td1 = -1;
min = d[jp];
}
todo[++td1] = jp;
}
}
for (var hp = 0; hp <= td1; hp++)
{
j = todo[hp];
if (y[j] == -1)
{
UpdateDual(nc, d, v, todo, last, min);
UpdateAssignments(lab, y, x, j, i0);
return td1;
}
ok[j] = true;
}
}
}
}
private static void UpdateDual(int nc, double[] d, double[] v, int[] todo, int last, double min)
{
for (var k = last; k < nc; k++)
{
var j0 = todo[k];
v[j0] += d[j0] - min;
}
}
private static void UpdateAssignments(int[] lab, int[] y, int[] x, int j, int i0)
{
while (true)
{
var i = lab[j];
y[j] = i;
var k = j;
j = x[i];
x[i] = k;
if (i == i0)
return;
}
}
}
} | 37.208243 | 113 | 0.352416 | [
"BSD-3-Clause"
] | apkd/linearassignment | src/LinearAssignment/ShortestPathSolver.cs | 17,155 | C# |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace RML
{
public interface IUFOSpawner
{
void Spawn();
}
}
| 12.769231 | 33 | 0.686747 | [
"MIT"
] | rp88imxo/RMLToroid | Assets/Scripts/GameLogic/ObjectSpawners/IUFOSpawner.cs | 166 | C# |
using MediatR;
using Microsoft.Extensions.Logging;
using System.Threading;
using System.Threading.Tasks;
namespace LinFx.Extensions.Mediator.Behaviors
{
public class LoggingBehavior<TRequest, TResponse> : IPipelineBehavior<TRequest, TResponse>
{
private readonly ILogger<LoggingBehavior<TRequest, TResponse>> _logger;
public LoggingBehavior(ILogger<LoggingBehavior<TRequest, TResponse>> logger) => _logger = logger;
public async Task<TResponse> Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate<TResponse> next)
{
_logger.LogInformation($"Handling {typeof(TRequest).Name}");
var response = await next();
_logger.LogInformation($"Handled {typeof(TResponse).Name}");
return response;
}
}
}
| 35.956522 | 138 | 0.711004 | [
"MIT"
] | ailuozhu/LinFx | src/LinFx/Extensions/MediatR/Behaviors/LoggingBehavior.cs | 829 | C# |
using System;
using System.Collections.Generic;
using System.Text.Json.Serialization;
namespace SignumExplorer.Models
{
public interface IGetUnconfirmedTransaction
{
public int Type { get; }
public int Subtype { get; }
public string TransactionType => TransactionTypes.TransactionDescription(Type,Subtype);
public int Timestamp { get; }
public DateTime Time => new DateTime(2014, 8, 11, 2, 0, 0, DateTimeKind.Utc).AddSeconds(Timestamp);
public int Deadline { get; }
public string SenderPublicKey { get; }
public string AmountNQT { get; }
public double AmountSigna => ulong.Parse(AmountNQT) / 100000000.0;
public string FeeNQT { get; }
public double FeeSigna => ulong.Parse(FeeNQT) / 100000000.0;
public string Signature { get; }
public string SignatureHash { get; }
public string FullHash { get; }
public string Transaction { get; }
public string Sender { get; }
public ulong SenderId => ulong.Parse(Sender);
public string SenderRS { get; }
public int Height { get; }
public int Version { get; }
public string EcBlockId { get; }
public int EcBlockHeight { get; }
public string Recipient { get; }
public ulong RecipientId
{
get
{
return ulong.TryParse(Recipient, out var recipientId) ? recipientId : ulong.MinValue;
}
}
public string RecipientRS { get; }
}
public interface IUnconfirmedTransAPI
{
public List<IGetUnconfirmedTransaction> UnconfirmedTransactions { get; }
public int RequestProcessingTime { get; }
}
public class UnconfirmedTransAPI : IUnconfirmedTransAPI
{
[JsonPropertyName("unconfirmedTransactions")]
public List<GetUnconfirmedTransaction> UnconfirmedTransactions {get; set;}
[JsonPropertyName("requestProcessingTime")]
public int RequestProcessingTime { get; set; }
List<IGetUnconfirmedTransaction> IUnconfirmedTransAPI.UnconfirmedTransactions => new List<IGetUnconfirmedTransaction>(UnconfirmedTransactions);
}
// Root myDeserializedClass = JsonSerializer.Deserialize<Root>(myJsonResponse);
public class GetUnconfirmedTransaction : IGetUnconfirmedTransaction
{
[JsonPropertyName("type")]
public int Type { get; set; }
[JsonPropertyName("subtype")]
public int Subtype { get; set; }
[JsonPropertyName("timestamp")]
public int Timestamp { get; set; }
[JsonPropertyName("deadline")]
public int Deadline { get; set; }
[JsonPropertyName("senderPublicKey")]
public string SenderPublicKey { get; set; }
[JsonPropertyName("amountNQT")]
public string AmountNQT { get; set; }
[JsonPropertyName("feeNQT")]
public string FeeNQT { get; set; }
[JsonPropertyName("signature")]
public string Signature { get; set; }
[JsonPropertyName("signatureHash")]
public string SignatureHash { get; set; }
[JsonPropertyName("fullHash")]
public string FullHash { get; set; }
[JsonPropertyName("transaction")]
public string Transaction { get; set; }
[JsonPropertyName("sender")]
public string Sender { get; set; }
[JsonPropertyName("senderRS")]
public string SenderRS { get; set; }
[JsonPropertyName("height")]
public int Height { get; set; }
[JsonPropertyName("version")]
public int Version { get; set; }
[JsonPropertyName("ecBlockId")]
public string EcBlockId { get; set; }
[JsonPropertyName("ecBlockHeight")]
public int EcBlockHeight { get; set; }
[JsonPropertyName("recipient")]
public string Recipient { get; set; }
[JsonPropertyName("recipientRS")]
public string RecipientRS { get; set; }
}
}
| 28.559441 | 151 | 0.618022 | [
"MIT"
] | rodrigue10/SignumExplorer | SignumExplorer/NodeAPI/Models/UnconfirmedTransactions/UnconfirmedTransAPI.cs | 4,086 | C# |
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Newtonsoft.Json;
namespace OneCGame
{
/// <summary>
/// Логика взаимодействия для MenuPage.xaml
/// </summary>
public partial class MenuPage : Page
{
public MenuPage()
{
InitializeComponent();
IsRemember.IsChecked = !string.IsNullOrEmpty(Properties.Settings.Default.Login);
LoginBox.Text = Properties.Settings.Default.Login;
IsRemember.Checked += IsRemember_Checked;
}
private async void Login_Click(object sender, RoutedEventArgs e)
{
IsEnabled = false;
if (IsRemember.IsChecked == true)
{
Properties.Settings.Default.Login = LoginBox.Text;
Properties.Settings.Default.Save();
}
var result = await Api.ApiRequest($"User/Auth?login={LoginBox.Text}&password={PasswordBox.Password}");
if (result.StatusCode == HttpStatusCode.OK)
{
NavigationService?.Navigate(new Uri("Pages/LobbyPage.xaml", UriKind.Relative));
}
else if (result.StatusCode == HttpStatusCode.Forbidden)
{
NavigationService?.Navigate(new ErrorPage("Invalid password"));
}
else
NavigationService?.Navigate(new ErrorPage("Request failed"));
IsEnabled = true;
}
private void LoginBox_KeyDown(object sender, KeyEventArgs e)
{
if (e.Key == Key.Enter)
Login_Click(sender, null);
}
private void Setting_Click(object sender, RoutedEventArgs e)
{
NavigationService?.Navigate(new Uri("Pages/SettingPage.xaml", UriKind.Relative));
}
private void Exit_Click(object sender, RoutedEventArgs e)
{
Application.Current.Shutdown(0);
}
private void IsRemember_Checked(object sender, RoutedEventArgs e)
{
if (IsRemember.IsChecked == true)
{
Properties.Settings.Default.Login = LoginBox.Text;
}
else
{
Properties.Settings.Default.Login = "";
}
}
}
} | 29.277778 | 114 | 0.6 | [
"MIT"
] | mrkriv/SimpleGame | SimpleGame/Pages/MenuPage.xaml.cs | 2,660 | C# |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
using System.Collections.Generic;
using System.Text.Json;
using Azure.Core;
namespace Azure.ResourceManager.Network.Models
{
public partial class BgpServiceCommunity : IUtf8JsonSerializable
{
void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
{
writer.WriteStartObject();
if (Id != null)
{
writer.WritePropertyName("id");
writer.WriteStringValue(Id);
}
if (Name != null)
{
writer.WritePropertyName("name");
writer.WriteStringValue(Name);
}
if (Type != null)
{
writer.WritePropertyName("type");
writer.WriteStringValue(Type);
}
if (Location != null)
{
writer.WritePropertyName("location");
writer.WriteStringValue(Location);
}
if (Tags != null)
{
writer.WritePropertyName("tags");
writer.WriteStartObject();
foreach (var item in Tags)
{
writer.WritePropertyName(item.Key);
writer.WriteStringValue(item.Value);
}
writer.WriteEndObject();
}
writer.WritePropertyName("properties");
writer.WriteStartObject();
if (ServiceName != null)
{
writer.WritePropertyName("serviceName");
writer.WriteStringValue(ServiceName);
}
if (BgpCommunities != null)
{
writer.WritePropertyName("bgpCommunities");
writer.WriteStartArray();
foreach (var item in BgpCommunities)
{
writer.WriteObjectValue(item);
}
writer.WriteEndArray();
}
writer.WriteEndObject();
writer.WriteEndObject();
}
internal static BgpServiceCommunity DeserializeBgpServiceCommunity(JsonElement element)
{
string id = default;
string name = default;
string type = default;
string location = default;
IDictionary<string, string> tags = default;
string serviceName = default;
IList<BGPCommunity> bgpCommunities = default;
foreach (var property in element.EnumerateObject())
{
if (property.NameEquals("id"))
{
if (property.Value.ValueKind == JsonValueKind.Null)
{
continue;
}
id = property.Value.GetString();
continue;
}
if (property.NameEquals("name"))
{
if (property.Value.ValueKind == JsonValueKind.Null)
{
continue;
}
name = property.Value.GetString();
continue;
}
if (property.NameEquals("type"))
{
if (property.Value.ValueKind == JsonValueKind.Null)
{
continue;
}
type = property.Value.GetString();
continue;
}
if (property.NameEquals("location"))
{
if (property.Value.ValueKind == JsonValueKind.Null)
{
continue;
}
location = property.Value.GetString();
continue;
}
if (property.NameEquals("tags"))
{
if (property.Value.ValueKind == JsonValueKind.Null)
{
continue;
}
Dictionary<string, string> dictionary = new Dictionary<string, string>();
foreach (var property0 in property.Value.EnumerateObject())
{
if (property0.Value.ValueKind == JsonValueKind.Null)
{
dictionary.Add(property0.Name, null);
}
else
{
dictionary.Add(property0.Name, property0.Value.GetString());
}
}
tags = dictionary;
continue;
}
if (property.NameEquals("properties"))
{
foreach (var property0 in property.Value.EnumerateObject())
{
if (property0.NameEquals("serviceName"))
{
if (property0.Value.ValueKind == JsonValueKind.Null)
{
continue;
}
serviceName = property0.Value.GetString();
continue;
}
if (property0.NameEquals("bgpCommunities"))
{
if (property0.Value.ValueKind == JsonValueKind.Null)
{
continue;
}
List<BGPCommunity> array = new List<BGPCommunity>();
foreach (var item in property0.Value.EnumerateArray())
{
if (item.ValueKind == JsonValueKind.Null)
{
array.Add(null);
}
else
{
array.Add(BGPCommunity.DeserializeBGPCommunity(item));
}
}
bgpCommunities = array;
continue;
}
}
continue;
}
}
return new BgpServiceCommunity(id, name, type, location, tags, serviceName, bgpCommunities);
}
}
}
| 36.552486 | 104 | 0.409462 | [
"MIT"
] | AzureDataBox/azure-sdk-for-net | sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BgpServiceCommunity.Serialization.cs | 6,616 | C# |
using System;
namespace RefresherSample
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}
| 14.076923 | 46 | 0.530055 | [
"Apache-2.0"
] | hamzashoukat94/NCache-Samples | dotnetcore/RefresherSample/RefresherSample/Program.cs | 185 | C# |
using System.Threading.Tasks;
using AutoMapper;
using $ext_projectname$.Data;
using $ext_projectname$.Entities;
using $safeprojectname$.Infrastructure.Settings;
using $safeprojectname$.ViewModels.LogViewModels;
using Calabonga.Microservices.Core.QueryParams;
using Calabonga.Microservices.Core.Validators;
using Calabonga.OperationResults;
using Calabonga.UnitOfWork;
using Calabonga.UnitOfWork.Controllers.Controllers;
using Calabonga.UnitOfWork.Controllers.Factories;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;
namespace $safeprojectname$.Controllers
{
/// <summary>
/// WritableController Demo
/// </summary>
[Route("api/[controller]")]
[Authorize]
public class LogsWritable2Controller : WritableController<LogViewModel, Log, LogCreateViewModel, LogUpdateViewModel, PagedListQueryParams>
{
private readonly CurrentAppSettings _appSettings;
/// <inheritdoc />
public LogsWritable2Controller(
IOptions<CurrentAppSettings> appSettings,
IEntityManagerFactory entityManagerFactory,
IUnitOfWork<ApplicationDbContext> unitOfWork,
IMapper mapper)
: base(entityManagerFactory, unitOfWork, mapper)
{
_appSettings = appSettings.Value;
}
/// <inheritdoc />
[Authorize(Policy = "LogsWritable:GetCreateViewModelAsync:View")]
public override Task<ActionResult<OperationResult<LogCreateViewModel>>> GetViewmodelForCreation()
{
return base.GetViewmodelForCreation();
}
/// <inheritdoc />
protected override PermissionValidationResult ValidateQueryParams(PagedListQueryParams queryParams)
{
if (queryParams.PageSize <= 0)
{
queryParams.PageSize = _appSettings.PageSize;
}
return new PermissionValidationResult();
}
}
} | 35.142857 | 142 | 0.704268 | [
"MIT"
] | Calabonga/Microservice-Template | AspNetCore v3.1/TemplateMicroserviceModuleV3/Calabonga.Microservice.Module.Web/Controllers/LogsWritable2Controller.cs | 1,970 | C# |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MagnifyController : MonoBehaviour
{
public Vector2 speed = new Vector2(50, 50);
void Update()
{
float inputX = Input.GetAxis("Horizontal");
float inputY = Input.GetAxis("Vertical");
Vector3 movement = new Vector3(speed.x * inputX, speed.y * inputY, 0);
movement *= Time.deltaTime;
transform.Translate(movement);
}
} | 23.4 | 78 | 0.66453 | [
"Unlicense"
] | matames/MidtermAmes | Assets/MagnifyController.cs | 468 | C# |
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.1433
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Mediachase.Ibn.Web.UI.HelpDeskManagement.Modules {
/// <summary>
/// IncidentListExport class.
/// </summary>
/// <remarks>
/// Auto-generated class.
/// </remarks>
public partial class IncidentListExport {
/// <summary>
/// rbList control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RadioButtonList rbList;
/// <summary>
/// btnExport control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnExport;
}
}
| 31.707317 | 84 | 0.51 | [
"MIT"
] | InstantBusinessNetwork/IBN | Source/Server/WebPortal/Apps/HelpDeskManagement/Modules/IncidentListExport.ascx.designer.cs | 1,300 | C# |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
using System;
using System.ComponentModel;
namespace Azure.Analytics.Synapse.Artifacts.Models
{
/// <summary> The authentication mechanism to use to connect to the HBase server. </summary>
public readonly partial struct HBaseAuthenticationType : IEquatable<HBaseAuthenticationType>
{
private readonly string _value;
/// <summary> Determines if two <see cref="HBaseAuthenticationType"/> values are the same. </summary>
public HBaseAuthenticationType(string value)
{
_value = value ?? throw new ArgumentNullException(nameof(value));
}
private const string AnonymousValue = "Anonymous";
private const string BasicValue = "Basic";
/// <summary> Anonymous. </summary>
public static HBaseAuthenticationType Anonymous { get; } = new HBaseAuthenticationType(AnonymousValue);
/// <summary> Basic. </summary>
public static HBaseAuthenticationType Basic { get; } = new HBaseAuthenticationType(BasicValue);
/// <summary> Determines if two <see cref="HBaseAuthenticationType"/> values are the same. </summary>
public static bool operator ==(HBaseAuthenticationType left, HBaseAuthenticationType right) => left.Equals(right);
/// <summary> Determines if two <see cref="HBaseAuthenticationType"/> values are not the same. </summary>
public static bool operator !=(HBaseAuthenticationType left, HBaseAuthenticationType right) => !left.Equals(right);
/// <summary> Converts a string to a <see cref="HBaseAuthenticationType"/>. </summary>
public static implicit operator HBaseAuthenticationType(string value) => new HBaseAuthenticationType(value);
/// <inheritdoc />
[EditorBrowsable(EditorBrowsableState.Never)]
public override bool Equals(object obj) => obj is HBaseAuthenticationType other && Equals(other);
/// <inheritdoc />
public bool Equals(HBaseAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase);
/// <inheritdoc />
[EditorBrowsable(EditorBrowsableState.Never)]
public override int GetHashCode() => _value?.GetHashCode() ?? 0;
/// <inheritdoc />
public override string ToString() => _value;
}
}
| 47.705882 | 142 | 0.697904 | [
"MIT"
] | AzureDataBox/azure-sdk-for-net | sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HBaseAuthenticationType.cs | 2,433 | C# |
using SolastaModApi.Infrastructure;
using System.Text;
using static RuleDefinitions;
namespace SolastaModApi.Extensions
{
/// <summary>
/// This helper extensions class was automatically generated.
/// If you find a problem please report at https://github.com/SolastaMods/SolastaModApi/issues.
/// </summary>
[TargetType(typeof(FeatureDefinitionProficiency))]
public static class FeatureDefinitionProficiencyExtensions
{
public static T SetProficienciesFormat<T>(this T entity, StringBuilder value)
where T : FeatureDefinitionProficiency
{
entity.SetField("proficienciesFormat", value);
return entity;
}
public static T SetProficiencyType<T>(this T entity, ProficiencyType value)
where T : FeatureDefinitionProficiency
{
entity.SetField("proficiencyType", value);
return entity;
}
}
} | 33.5 | 99 | 0.676972 | [
"MIT"
] | ChrisPJohn/SolastaModApi | SolastaModApi/Extensions/FeatureDefinitionProficiencyExtensions.cs | 938 | C# |
using System.Linq;
using Basket.Models.Entities;
using Basket.Models.Persistence;
namespace Basket.Models.Repositories
{
public class EfBasketRepository : IBasketRepository
{
private readonly BasketDbContext _context;
public EfBasketRepository(BasketDbContext context)
{
_context = context;
}
public IQueryable<Form> Forms => _context.Forms;
}
} | 22.944444 | 58 | 0.687651 | [
"MIT"
] | mamalmaleki/basket | BasketSln/Basket/Models/Repositories/EfBasketRepository.cs | 415 | C# |
#pragma checksum "C:\Users\Srush\OneDrive\Documents\GitHub\MLiS-II-Project-Programming-an-Autonomous-Driving-Car\Code\Dev\Data_Labeler\MainPage.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "B5CD5473CEFB9025D0FF7466A6879C0E09ADB1317F044D3FF0DAB274FB9AE123"
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Data_Labeler
{
partial class MainPage :
global::Windows.UI.Xaml.Controls.Page,
global::Windows.UI.Xaml.Markup.IComponentConnector,
global::Windows.UI.Xaml.Markup.IComponentConnector2
{
/// <summary>
/// Connect()
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 0.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public void Connect(int connectionId, object target)
{
switch(connectionId)
{
case 2: // MainPage.xaml line 82
{
this.__Button_Load_Images = (global::Windows.UI.Xaml.Controls.Button)(target);
((global::Windows.UI.Xaml.Controls.Button)this.__Button_Load_Images).Click += this.__Button_Load_Images_Click;
}
break;
case 3: // MainPage.xaml line 30
{
this.__Button_Left = (global::Windows.UI.Xaml.Controls.Button)(target);
}
break;
case 4: // MainPage.xaml line 42
{
this.__Folder_Path = (global::Windows.UI.Xaml.Controls.TextBox)(target);
}
break;
case 5: // MainPage.xaml line 46
{
this.__Change_Folder_Path = (global::Windows.UI.Xaml.Controls.Button)(target);
((global::Windows.UI.Xaml.Controls.Button)this.__Change_Folder_Path).Click += this.__Change_Folder_Path_Click;
}
break;
case 6: // MainPage.xaml line 51
{
this.__Button_Right = (global::Windows.UI.Xaml.Controls.Button)(target);
}
break;
default:
break;
}
this._contentLoaded = true;
}
/// <summary>
/// GetBindingConnector(int connectionId, object target)
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 0.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public global::Windows.UI.Xaml.Markup.IComponentConnector GetBindingConnector(int connectionId, object target)
{
global::Windows.UI.Xaml.Markup.IComponentConnector returnValue = null;
return returnValue;
}
}
}
| 43.027397 | 258 | 0.558103 | [
"MIT"
] | Srushanth/MLiS-II-Project-Programming-an-Autonomous-Driving-Car | Code/Dev/Data_Labeler/obj/x86/Debug/MainPage.g.cs | 3,143 | C# |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.